var icons=Array("carNew","carUsed","checking","couple","creditCards","house","thief");
var eurl=Array("new_car/pages","used_car/pages","checking","couples_money","credit","home_buying/pages","id_theft");
var surl=Array("new_car_spanish","used_car_spanish","checking_spanish","couples_money_spanish","credit_spanish","home_buying_spanish","id_theft_spanish");
var etxt=Array("New Car Buying","Used Car Buying","Checking Account","Couples and Money","Credit Management","Home Buying","Identity Theft");
var stxt=Array("para la compra de un auto nuevo","para la compra de un auto usado","de cuenta chequera","-","de manejo del cr&eacute;dito","de compra de un hogar","de robo de identidad");

var speedBumpText_en="<span style='color:#900; font-weight:bold; font-size:12px;'>Important Information:</span><br>Please be aware that by clicking this link you will be leaving http://www.members1st.org and viewing content from another web site.";
var speedBumpText_sp=speedBumpText_en;

//URL Construction Strings
var web="http://anytime.cuna.org/";
var acct="27815/";
var ext="/001_001_001.html";
var url;

var headerText;

function addCoach(im,btype,lang){
		new_surl=web+acct+surl[im]+ext;
		new_eurl=web+acct+eurl[im]+ext;

	//Construct the URL (spanish or english)
		if(lang=="s"){
			addurl="/cuna_dynamic_sp.html"
		} else {
			addurl="/cuna_dynamic_en.html"
		}
	//document.write(url+"<br>"); document.write(addurl);
		
	document.write("<div class='co_container'>");
	document.write("<div class='co_info'>");
	document.write("<div class='co_iconBG'>");
		if(im<0 && im>icons.length-1){/*Do Nothing*/}else{iString="<img style='position:absolute; top:-13px; left:-11px;' src='/Images/cuna/icons/icon_"+icons[im]+".gif'  />"; document.write(iString);}
	document.write("</div>");
	document.write("<div class='co_text'>");
	
	//Construct Text for box:
		if(lang=="s"){
			headerText="<div class='coach'>CONSEJERO</div>"+stxt[im];
		} else {
			headerText=etxt[im]+"<div class='coach'>COACH</div>";
		}
	
	document.write(headerText);
	document.write("</div>");
	document.write("<br class='cls' />");
	document.write("</div>");
	document.write("<div class='bt_container'>");
	document.write("<div class='bt_lt'></div>");
		addType=btype.split("|");
		for(i=0;i<=addType.length-1;i++){
		 switch (addType[i])
		 	{
				case "e": document.write("<div class='bt_en' onclick='goCoach(\""+new_eurl+"\");'><span class=\'speedBump\'>"+speedBumpText_en+"</span></div>"); break; //Create English Click
				case "s": document.write("<div class='bt_sp' onclick='goCoach(\""+new_surl+"\");'><span class=\'speedBump\'>"+speedBumpText_sp+"</span></div>"); break; // Create Spanish Click
				case "a": document.write("<div class='bt_ad' onclick='goCoach(\""+addurl+"\",590,540,\"coachGroup\");'></div>"); break; //This will open the window with other coaches
				default: document.write("<div class='bt_ad'></div>"); break;
			}
		}
	document.write("<div class='bt_rt'></div>");
	document.write("</div>");
	document.write("<br class='cls' />");
	document.write("</div>");
	document.write("<br class='vertSpace_1' />");
}

	function setImg(myDest,fileName){
		document.getElementById(myDest).style.backgroundImage="url("+fileName+")";
		}
	
	function isout(myDest,btn){
		if(!btn){btn=0};
		if(btn==0){ fileName='/scripts/btn_up_english.gif'; }
		if(btn==1){ fileName='/scripts/btn_up_spanish.gif'; }
		document.getElementById(myDest).style.backgroundImage="url("+fileName+")";
	}
	function isover(myDest,btn){
		if(!btn){btn=0};
		if(btn==0){ fileName='/scripts/btn_down_english.gif'; }
		if(btn==1){ fileName='/scripts/btn_down_spanish.gif'; }
		document.getElementById(myDest).style.backgroundImage="url("+fileName+")";
	}
	function setup(){	
	isout("en",0);
	isout("sp",1);
	setImg("idTheft","/scripts/img_up_idTheft.gif");
	}
	
	function goCoach(goWhere,goWide,goHigh,winName)
	{
		//alert(goWhere);
		if (!goWide){goWide=680;}
		if (!goHigh){goHigh=645;}
		if (!winName){winName="subWin"}
		newWindow = window.open(goWhere,winName,"status,menubar,height="+goHigh+",width="+goWide);
		newWindow.focus( );
	}
	
	function fixSize(goWide,goHigh){
		if (!goWide){goWide=680;}
		if (!goHigh){goHigh=465;}
		this.resizeTo(goWide,goHigh);
	}