function img_loader(){
	
	var img = new Image();
	img.src="../images/layout/ico-loading.gif";
	return img;

}

$(document).ready(function() {
	$("#srchfrm").focus(function(){
		$("#srchfrm").val("");
	
	});
});

function writemail(mail1, mail2, subject, title){
  document.open();
  document.writeln('<a href="mailto:' + mail1 + '@' + mail2 + '?subject='+subject+'" title="'+title+'">'+ mail1 + '@' + mail2 + '</a>');
  document.close();
}

function changeTextSize(div, mode) {
	if (mode == "increase") {
		textSize = YAHOO.util.Dom.getStyle(div, "font-size");
		textSize = Number(textSize.substring(0,2));
		if (textSize < 18) {
			textSize = textSize+1;
			YAHOO.util.Dom.setStyle(div, "font-size", String(textSize) + "px");
		}
	}else if (mode == "decrease") {
		textSize = YAHOO.util.Dom.getStyle(div, "font-size");
		textSize = Number(textSize.substring(0,2));
		if (textSize > 10) {
			textSize = textSize-1;
			YAHOO.util.Dom.setStyle(div, "font-size", String(textSize) + "px");
		}
	}else {
    	YAHOO.util.Dom.setStyle(div, "font-size", "12px");
    }
}

function maxChar(field, maxlength){
	if (document.getElementById(field).value.length > maxlength) {
		alert("Please do not enter more than "+maxlength+" characters.  Please shorten your entry and submit again.");
		document.getElementById(field).focus();
		return false;
   	}else return true;
}


function newWindow(goto, width, height){
	window.open(goto,'mywindow','width='+width+',height='+height+'resizable=yes, scrollbars=yes, toolbar=no, left=100,top=100,screenX=100,screenY=100')
}