// changeImage function
function ChangeImage(ImageName, NewImage, Title, Directory)
{
if (document.images)
	{
// alert (ImageName + " - " + NewImage + " - " + Title + " - " + Directory);
	if (String (Directory) != "undefined")
		document[ImageName].src = Directory + "/" + NewImage;
	else
		document[ImageName].src = "images/" + NewImage;
	}

if (String (Title) != "undefined")
	window.status=Title;
else
	window.status=' ';
}

function chgbk(id, newcolor)
{
	if(document.layers){ // browser="NN4"; 
	
	document.layers[id].bgColor = newcolor; 
	
	} 
	
	if(document.all){ // browser="IE"; 
	
	document.all[id].style.backgroundColor = newcolor; 
	
	} 
	
	if(!document.all && document.getElementById){ // browser="NN6+ or IE5+ if you're willing to dump the !document.all stuff"; 
	
	document.getElementById(id).style.backgroundColor = newcolor; 
	
	} 
}

function redirectToExitPage(filename,exitPageUrl,newWindow,displayExitMsg,windowname)
{
	var redirectUrl = exitPageUrl + "&url=" + filename + "&Exit=" + displayExitMsg;
	if (String (newWindow) == "false" ) {
		document.location.href = redirectUrl;
	} else {
		popupWindowWithLocation(redirectUrl,windowname,"682","352"); 
	}
}
 
function popupWindow(filename,windowname,width,height) 
{
popup=window.open(filename,windowname,"width="+width+",height="+height+",resizable=yes,status=no,toolbar=yes,directories=no,menubar=yes,scrollbars=yes,location=no");
}

function popupWindowWithLocation(filename,windowname,width,height) 
{
popup=window.open(filename,windowname,"width="+width+",height="+height+",resizable=yes,status=yes,toolbar=yes,directories=no,menubar=yes,scrollbars=yes,location=yes");
}

function popupWindowNoToolbars(filename,windowname,width,height) 
{
popup=window.open(filename,windowname,"width="+width+",height="+height+",resizable=no,status=no,toolbar=no,directories=no,menubar=no,scrollbars=yes,location=no");
}

function popupWhyComerica(filename)
{
	popupWindowWithLocation(filename, "why_com", "640", "480");
}

function popupGlossary(filename)
{
	popupWindowNoToolbars(filename, 'glossary', '690', '470');
}

function popupFAQ(filename)
{
	popupWindowNoToolbars(filename, "faq", "690", "470");
}

function popupNewsletter(filename)
{
	popupWindowWithLocation(filename, "newsletter", "800", "600");
}

function popupCalculator(filename)
{
	popupWindowWithLocation(filename, "calculator", "515", "655");
}

function popupDemo(filename)
{
	popupWindowWithLocation(filename, "demo", "800", "600");
}

function popupTutorial(filename)
{
	popupWindowWithLocation(filename, "tutorial", "515", "655");
}

function popupBranchATM(filename)
{
	popupWindowWithLocation(filename, "branchATM", "575", "600");
}

function popupForm(filename)
{
	//popupWindowWithLocation(filename, "form", "575", "600");
	popupWindowWithLocation(filename, "form", "690", "600");
}

function popupLogin(filename)
{
	popupWindowWithLocation(filename, "login", "800", "600");
}

function popupApply(filename)
{
	popupWindowWithLocation(filename, "apply", "800", "600");
}

function popupPrintable(filename)
{
	popupWindow(filename, "printable", "670", "575");
}

function popupPDF(filename)
{
	popupWindowWithLocation(filename, "pdf", "800", "600");
}





