<!--

//opens a new popup window containing the page from parameter "url":
var newWin;
function WinOpen(url,title,w,h){
	w=parseInt(w);
	h=parseInt(h);
	newWin=window.open(url,title,"width="+w+",height="+h+",top=50,left=50,location=no,directories=no,hotkeys=no,copyhistory=no,resizable=yes,menubar=no,status=no,toolbar=no,scrollbars=yes,z-lock=yes");
	newWin.focus();
}
var newWin1;
function WinOpen1(url,title){
	newWin1=window.open(url,title,"width=760,height=700,top=0,left=0,location=no,directories=no,hotkeys=no,copyhistory=no,resizable=yes,menubar=no,status=no,toolbar=no,scrollbars=yes,z-lock=yes");
	newWin1.focus();
}
//opens a new popup window containing the image from parameter:
var newWinImg;
function OpenImage(imgFile){
	if (new String(newWinImg)!="undefined" && newWinImg!=null) if (!newWinImg.closed) newWinImg.close();
	var newWinImg=window.open("","ProjectNewWindowImage","width=100,height=100,top=0,left=0,location=no,directories=no,hotkeys=no,copyhistory=no,resizable=no,menubar=no,status=no,toolbar=no,scrollbars=no,z-lock=yes");
	newWinImg.document.write('<html><head><title>Countryside :: Image Details</title><link rel="stylesheet" src="style.css"></head><body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" bgcolor="#ffffff" onload="window.resizeTo(parseInt(document.images[\'img\'].width)+10,parseInt(document.images[\'img\'].height)+29)"><img src="' + imgFile + '" name="img" /></body></html>');
	newWinImg.document.close();
	newWinImg.focus();
}

//used for paging:
function GoToPageNo(page){
	document.frmPaging.page.value=page;
	document.frmPaging.submit();
}
//trims the leading and trailing blanks from a given string 
function Trim(strToTrim){
	while(strToTrim.charAt(0)==' '){	
		strToTrim = strToTrim.substring(1,strToTrim.length);
	}
	while(strToTrim.charAt(strToTrim.length-1)==' '){	
		strToTrim = strToTrim.substring(0,strToTrim.length-1);
	}
	return strToTrim;
}
function ImageViewer(picFileName){
	if (picFileName!=""){
		var viewWin = window.open("","imgWin","width=160,height=160,statusbar=no,resizable=no,scrollbars=no,top=50,left=50");
		viewWin.document.open();
		viewWin.document.write("<HTML><HEAD><TITLE>View Image</TITLE><LINK rel='stylesheet' href='style.css'></HEAD><BODY bgcolor=#ffffff marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 onload='self.resizeTo((document.images[\"img1\"].width + 5),(document.images[\"img1\"].height+90))'>");
		viewWin.document.write("<CENTER><IMG name=img1 src='images/" + picFileName + "'><BR><BR><A href='javascript:self.close()'><B>Close</B></A></CENTER>");
		viewWin.document.write("</BODY></HTML>");
		viewWin.document.close();
		viewWin.focus();
	}
}
function ImageViewer1(picFileName){
	if (picFileName!=""){
		var viewWin = window.open("","imgWin","width=160,height=160,statusbar=no,resizable=no,scrollbars=no,top=50,left=50");
		viewWin.document.open();
		viewWin.document.write("<html><head><title>View Image</title><link rel='stylesheet' href='style.css'></head><body bgcolor=#ffffff marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 onload='self.resizeTo((document.images[\"img1\"].width + 5),(document.images[\"img1\"].height+90))'>");
		viewWin.document.write("<center><img name=img1 src='" + picFileName + "'><br><br><a href='javascript:self.close()' class='left'><b>Close</b></a></center>");
		viewWin.document.write("</body></html>");
		viewWin.document.close();
		viewWin.focus();
	}
}
//validate email address
function emailAddressIsValid(str){
	var emailAddressFormat = /^[a-zA-Z0-9._-]+@([a-zA-Z0-9.-]+\.)+[a-zA-Z0-9.-]{2,3}$/;
	if (!(emailAddressFormat.test(str))){
		return false;
	}
	return true;
}
//-->