function printWindow(url) 	{
	mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=520,height=400');
	}
	
function mailWindow(url)	{
	mywin2 = window.open(url,"win2",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=620,height=400');
	}
	
function open_window(url) 	{
	mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=650,height=570');
	}
	
function help_window(url) 	{
	mywin = window.open(url,"help",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=300,height=350,left=600,top=100');
	}
	
function pp_window(url) 	{
	mywin = window.open(url,"help",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=425,height=400,left=600,top=100');
	}
	
function cLocate(murl,curl){
	self.location=curl;
}

function PopUp (url, hWind, nWidth, nHeight, nScroll) {
	var cToolBar = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=" + nScroll + ",resizable=1,width=" + nWidth + ",height=" + nHeight
	var popupwin = window.open(url, hWind, cToolBar);
}
function PopUpMenu (url,cid, hWind, nWidth, nHeight, nScroll) {
	var cToolBar = "toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=" + nScroll + ",resizable=1,width=" + nWidth + ",height=" + nHeight
	url = url+'?cid='+cid;
	var popupwin = window.open(url, hWind, cToolBar);
}

function PrintFriendly_popup(cbid, pid, valid) {
			window.open ('../@Resource/Contents/PrintFriendly.cfm?PrintPage='+cbid+'&printpagelink='+pid+'&validbttn='+valid, "printWin", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=640,height=480,left=600,top=100');
}
function Email2Friends_popup(cbid, pid, valid) {
			window.open ('../@Resource/Contents/sendemail.cfm?emailpage='+cbid+'&emailpagelink='+pid+'&validbttn='+valid, "email2Win", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=600,height=400,left=600,top=100');
}
//this function counts 1000 character limit for memo box in formbuilder
function textCounter(field,cntfield,maxlimit) 
{
	if (document.getElementById(field).value.length > maxlimit)
		{
			document.getElementById(field).value = document.getElementById(field).value.substring(0, maxlimit);
		}
	else
		{
			try{
				document.getElementById(cntfield).innerHTML = maxlimit - document.getElementById(field).value.length;	
			}
			catch(err)
			{
				
			}
			
		}	
		
}