if(document.images){
	img1=new Image; img1.src="bg_upr.jpg";
	img2=new Image; img2.src="bg_uprInr.jpg";
	img3=new Image; img3.src="bnr.jpg";
	
	btn_m1=new Image; btn_m2=new Image; btn_m3=new Image; btn_m4=new Image; btn_m5=new Image; btn_m6=new Image; btn_m7=new Image; btn_m8=new Image;
	btn_m1_act=new Image; btn_m2_act=new Image; btn_m3_act=new Image; btn_m4_act=new Image; btn_m5_act=new Image; btn_m6_act=new Image; btn_m7_act=new Image; btn_m8_act=new Image;
	
	btn_m1.src="btn_home.jpg"; btn_m2.src="btn_practice.jpg"; btn_m3.src="btn_services.jpg"; btn_m4.src="btn_products.jpg"; btn_m5.src="btn_insurance.jpg"; btn_m6.src="btn_promotions.jpg"; btn_m7.src="btn_forms.jpg"; btn_m8.src="btn_contact.jpg";
	btn_m1_act.src="btn_home_act.jpg"; btn_m2_act.src="btn_practice_act.jpg"; btn_m3_act.src="btn_services_act.jpg"; btn_m4_act.src="btn_products_act.jpg"; btn_m5_act.src="btn_insurance_act.jpg"; btn_m6_act.src="btn_promotions_act.jpg"; btn_m7_act.src="btn_forms_act.jpg"; btn_m8_act.src="btn_contact_act.jpg"; 
}
function act(cbtn,nbtn){
	document.getElementById(cbtn).src=nbtn;
}
function nsimg(){
	simgvLoc=document.getElementById("simgv").value;
	if(simgvLoc=="int"){
		document.getElementById("simgv").value="snd";
		document.getElementById("simg").src="imgCh.php";
	}
	else{
		document.getElementById("simgv").value="int";
		document.getElementById("simg").src="img.php";
	}
}
function rmWm(){
	document.getElementById("wm").style.display="none";	
}
function preImgs(numImages){
	dspImages=new Array();
	for (i=0; i<numImages; i++){
		dspImages[i]=new Image();
		dspImages[i].src="photos/img"+(i+1)+".jpg";
	}
}
function sPh(nCid){

	///preImgs(6) add to onload

	thbId="i"+nCid;
	dImg="photos/img"+nCid+".jpg";
	transE="blendTrans(duration=1)";
	var canBeFiltered=false;
		if (document.images.dspImg && document.images.dspImg.style && document.images.dspImg.style.filters){
			canBeFiltered=true;
			target = document.images.dspImg;
		}
		if (document.all && document.getElementById("dspImg")){
			canBeFiltered=true;
			target = document.getElementById("dspImg");
		}
		cImgIndex = (nCid-1)*1; /*hack to make numeric*/	
		if (dspImages[cImgIndex].complete){
			/*****	
			if(document.getElementById(thbId).src=="photos/wait.gif"){
				document.getElementById(thbId).src="photos/thb"+nCid+".jpg";
			}
			*****/
			if (canBeFiltered){
	       		target.style.filter=transE;
	       		if (target.filters && target.filters[0]){
	  	       		target.filters[0].Apply();
				}
 	       	}
		    	document.images.dspImg.src=dspImages[cImgIndex].src;
			if (canBeFiltered){
	       		if (target.filters  && target.filters[0]){
	  	       		target.filters[0].Play();
				}
			}
		}	
		else{
			/*****
			if(document.getElementById(thbId).src!="photos/wait.gif"){
				document.getElementById(thbId).src="photos/wait.gif";
			}
			setTimeout("sPh(nCid)", 600);
			*****/
		} 
	cCid = document.form1.currDsp.value; 
	if(cCid==""){cCid = 1;}
	currCid = "c"+cCid;
	newCid = "c"+nCid;
	document.getElementById(newCid).style.backgroundColor="#FFCC66";
	document.getElementById(currCid).style.backgroundColor="#663300";
	document.form1.currDsp.value=nCid;
}
/******************* divider **************************/
function h_s(){
	sts = document.getElementById("vSts").value;
	if(sts==null || !sts || sts=="s"){
		document.getElementById("dtlsR1").style.display="none";
		document.getElementById("dtlsR2").style.display="none";
		document.getElementById("vSts").value="h";
		document.getElementById("hdshw").src="btn_sDtls.jpg";
	}	
	else{
		document.getElementById("dtlsR1").style.display="";
		document.getElementById("dtlsR2").style.display="";
		document.getElementById("vSts").value="s";
		document.getElementById("hdshw").src="btn_hDtls.jpg";
	}
}
