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 glossary_window(url) {
	mywin = window.open(url,"win",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=450,height=250');
	}
		
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=1,menubar=0,scrollbars=" + nScroll + ",resizable=1,width=" + nWidth + ",height=" + nHeight;
	var popupwin = window.open(url, hWind, cToolBar);
}

function PopUp_Window (url, hWind, nWidth, nHeight, options) {
	var cToolBar = "width=" + nWidth + ",height=" + nHeight + "," + options;
	var popupwin = window.open(url, hWind, cToolBar);
}

function p3p_popup() {
			window.open ('http://mercury/CMSImagetrend/@Resource/p3p/p3pedit.cfm', "p3p", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,width=600,height=600,left=600,top=100');
		}
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');
}
/*
startList = function() {
if (document.all&&document.getElementById) {
vertmenuRoot = document.getElementById("vertmenu");
for (i=0; i<vertmenuRoot.childNodes.length; i++) {
node = vertmenuRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;*/
//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)
			{
				
			}
			
		}	
		
}
