(function($) { 
	
	/* open external links in new window */
	if (document.getElementsByTagName) {
		var anchors = document.getElementsByTagName("a");
		for (var i=0; i<anchors.length; i++) {
			var anchor = anchors[i];
			if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
				anchor.target = "_blank";
		}	
	}
	
	/* style form buttons */
	var imgPath = "/img/"
	var buttons = new Array(
		"submit-button"
		);
	var i=0;
	for(i==0;i<buttons.length;i++){
		var b=$(buttons[i]);
		if(b){
			b.mouseover(function(){this.src=imgPath+this.id+'-over.gif'});
			b.mouseout(function(){this.src=imgPath+this.id+'.gif'});
		}
	}		
	
})(jQuery)


/*-------------------------------------------------------------------------*/
function generateEmailLink(n,d) {
	var username = n;
	var hostname = d;
	var linktext = n+"@"+d;
	document.write("<a hr"+"ef=" + "mai"+"l" + "to:" + username +
	"@" + hostname + ">" + linktext + "</"+"a>")
}
/*-------------------------------------------------------------------------*/
function wipe(el) {
	if($(el).attr('value') == $(el).attr('title')) $(el).attr('value','');
}
