function submitForm()
{
document.butterflyinfo.submit();
}
function bolPopupURL(aURL){
var newWin=window.open(aURL,"bol","directories=0,height=480,width=578,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=yes");
var agt=navigator.userAgent.toLowerCase(); 
if(!(agt.indexOf("msie")!=-1 && (parseInt(agt.substr(agt.indexOf("msie")+5,1))==4))){
newWin.focus();
}
}

function bolPopupURLClose(aURL){
winArray[winArray.length] = window.open(aURL,"bol","directories=0,height=480,width=578,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=yes");
var agt=navigator.userAgent.toLowerCase(); 
}
function bolCloseChildren()
{
	for(i=0;i<winArray.length;i++)
	{
		// check if window wasn't already closed 
		if (winArray[i] && !winArray[i].closed) 
		{	
		  winArray[i].close();
		}		
	}
	winArray.length = 0;
}
function bolBillPayPopup(aURL){
var newWin=window.open(aURL,"Help","directories=0,height=450,width=450,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no");
var agt=navigator.userAgent.toLowerCase(); 
if(!(agt.indexOf("msie")!=-1 && (parseInt(agt.substr(agt.indexOf("msie")+5,1))==4))){
newWin.focus();
}
}
function bolAdPopupURL(aURL){
var leftOffset=0;
var topOffset=0;
var popupwidth=800;
var popupheight=400;
if(screen.width){
if(screen.width>popupwidth){
leftOffset=((screen.width-popupwidth)/2);
}  
}
var newWin=window.open(aURL,"bol",'directories=0,left='+leftOffset+',top='+topOffset+',screenx='+leftOffset+',screeny='+topOffset+',height='+popupheight+',location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=yes,width='+popupwidth);
var agt=navigator.userAgent.toLowerCase(); 
if(!(agt.indexOf("msie")!=-1&&(parseInt(agt.substr(agt.indexOf("msie")+5,1))==4))){
newWin.focus();
}
}

function bolOffSiteLink(gotoName,gotoURL){  
gotoName = escape(gotoName);
gotoURL = escape(gotoURL); 
var OffSitePopUpURL;
var leftOffset=0;
var topOffset=0;    
OffSitePopUpURL="/bolOffSiteLink.aspx"; 
if(screen.width){
if(screen.width < 800){
leftOffset=60;
topOffset=90;
}else{
if(screen.width>=800&&screen.width<1024){
leftOffset=160;
topOffset=134;
}else{
if(screen.width>=1024){
leftOffset=272;
topOffset=250;
}
}
}
}
var loadURL=OffSitePopUpURL+'?gotoName='+gotoName+'&gotoURL='+gotoURL;
var webLinkWin=window.open(loadURL,"view",'width=480,height=295,left='+leftOffset+',top='+topOffset+',screenx='+leftOffset+',screeny='+topOffset+',resizable=no,scrollbars=yes,menubar=no');
webLinkWin.focus();
}
