function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
        mn_home_over = newImage("i/mn_home_over.gif");
        mn_m_and_a_over = newImage("i/mn_m_and_a_over.gif");
        mn_physicians_over = newImage("i/mn_physicians_over.gif");
        mn_non_physician_over = newImage("i/mn_non_physician_over.gif");
        mn_hospital_admin_over = newImage("i/mn_hospital_admin_over.gif");
        mn_mp_emplyees_over = newImage("i/mn_mp_emplyees_over.gif");
		
		ln_m_and_a_over = newImage("i/ln_m_and_a_over.gif");
		ln_providers_over = newImage("i/ln_providers_over.gif");
		ln_vendors_over = newImage("i/ln_vendors_over.gif");
		ln_hospital_admin_over = newImage("i/ln_hospital_admin_over.gif");
		ln_mp_employees_over = newImage("i/ln_mp_employees_over.gif");
		preloadFlag = true;
	}
}

function contactPopup(url,width,height){
	//alert("This feature is currently under construction.");

	var wnObj = open(url,'newWin','width='+width+',height='+height+',top=0,left=0,screeny=0,screenx=0,resizable=yes');
	wnObj.focus();
	wnObj.resizeTo(width,height);
}

function cntPopScroll(url,width,height){
	scrollVr = "no";
	resizeVr = "yes";
	if(screen.height<height){
		height = screen.height - 25;
		width = width + 20;
		scrollVr = "yes";
	}
	
	//alert("This feature is currently under construction.");
	//if ((screen.width>1024) && (screen.height>768)){
	
	var wnObj = open(url,'newWin','width='+width+',height='+height+',top=0,left=0,screeny=0,screenx=0,scrollbars='+scrollVr+',resizable='+resizeVr);
	wnObj.focus();
	wnObj.resizeTo(width,height);
}

function privacyPopup(url){
	var wnObj = open(url,'newWin','width=409,height=550,top=0,left=0,screeny=0,screenx=0,resizable=yes');
	wnObj.focus();
}

function videoPopup(url,width,height){
	var wnObj = open(url,'newWin','width='+width+',height='+height+',top=0,left=0,screeny=0,screenx=0,resizable=yes');
	wnObj.focus();
}

function langSites(){
	var str = "This area of the MetroPlus website is \n currently under construction.";
	alert(str);
}

function clearFields(formName){
	formObj = eval("document." + formName);
	for(i=0;i<formObj.elements.length;i++){
		if(formObj.elements[i].name.indexOf('state')>-1)continue;
		formObj.elements[i].value = "";
	}
}