

/*
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
CALL TO CORRECT DIRECTORY
*/


//if you are on homepage you need <script> var file = "home";</script> to make codework properly

var imgdir;
var sitedir;
var styledir;
var homedir;

if(window.homepage)
{
imgdir="images/";
sitedir="site/";
styledir="site/"
homedir ="";
}
else if(window.absolute)
{
imgdir="https://www.coventrycu.org/images/"
sitedir="http://www.coventrycu.org/site/"
styledir="https://www.coventrycu.org/site/"
homedir = "http://www.coventrycu.org/"
}
else
{
imgdir="../images/";
sitedir="";
styledir=""
homedir = ""
}

document.write('<scr' + 'ipt type="text/javascript" src="' + homedir + 'speedbump.js"></scr' + 'ipt>');


/* old app URL https://cyber1.fi1.net/forms/coventrycu/ccuLoanApp.asp */
function maxWindow(URL)
{
 var pWidth = (parseInt(screen.width) ); 
 var pHeight = (parseInt(screen.height) );
 maxH = (parseInt(screen.availHeight));
 maxW = (parseInt(screen.availWidth));
        window.open(URL,"", "width="+maxW+",height="+maxH+",left=1,top=1,toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1");
}

//open appplications
function open_apps(nameofapp)
{
 var pWidth = 1; 
 var pHeight = 1;
 maxH = (parseInt(screen.availHeight));
 maxW = (parseInt(screen.availWidth));
 
aWindow = window.open('https://www.coventrycu.org/Forms/OnlineForm.cgi?form=' + nameofapp,'application',"toolbar=1,location=1,directories=1,status=1,menubar=1,width="+maxW+",height="+maxH+",top=" + pHeight + ",left=" + pWidth + ",scrollbars=1,resizable=0,status=1");
}


//open application windows
//sample link <a href="javascript:openwin('URL')"></a>
	function openWin(URL) {
	 aWindow = window.open(URL,"application","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=0,width=600,height=450,screenX=100,screenY=104,top=90,left=100");
	  }
	  
function showpopup(nameofapp , width , height, options) 
{
		var attributes = (options != null) ? options : ",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1";
		var halfwidth = width/2;
		var halfheight = height/2;
	 	var pWidth = ( ((parseInt(screen.width) / 2)) - halfwidth)
		var pHeight = (((parseInt(screen.height) / 2)) - halfheight)
		aWindow = window.open(nameofapp,'application',"width=" + width + ",height=" + height + ",top=" + pHeight + ",left=" + pWidth + attributes);
}   



function showCalc(calc){
	 var pWidth = 1; 
	 var pHeight = 1;
	 maxH = (parseInt(screen.availHeight));
	 maxW = (parseInt(screen.availWidth));
	window.open(calc,'calculator',"toolbar=1,location=1,directories=1,status=1,menubar=1,width="+maxW+",height="+maxH+",top=" + pHeight + ",left=" + pWidth + ",scrollbars=1,resizable=0,status=1");
}




//style sheet sniffer 
(navigator.appName == "Netscape") && (navigator.userAgent.indexOf('Mac') != -1) ? document.write('<link href="' + styledir + '_macstyle.css" rel="stylesheet">') : document.write('<link href="' + styledir + '_winstyle.css" rel="stylesheet">');

