
preloadImages('http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/about_r.gif','http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/about.gif','http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/general_surgery_r.gif','http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/general_surgery.gif','http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/urology_r.gif','http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/urology.gif','http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/heart_r.gif','http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/heart.gif','http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/gynecology_r.gif','http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/gynecology.gif','http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/robotic-surgery-for-physicians_r.gif','http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/robotic-surgery-for-physicians.gif','http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/contact_us_and_directions_r.gif','http://www.stjosephsatlanta.org/center-for-robotic-surgery/images/links/contact_us_and_directions.gif',			  
			  'http://www.stjosephsatlanta.org/images/links/volunteerson.gif','http://www.stjosephsatlanta.org/images/links/volunteersoff.gif',
			  'http://www.stjosephsatlanta.org/images/donation2on.gif','http://www.stjosephsatlanta.org/images/donation2off.gif',
			  'http://www.stjosephsatlanta.org/images/prereg2on.gif','http://www.stjosephsatlanta.org/images/prereg2off.gif',
			  'http://www.stjosephsatlanta.org/images/physon2.gif','http://www.stjosephsatlanta.org/images/physoff2.gif',
			  'http://www.stjosephsatlanta.org/images/aNav07_r.gif','http://www.stjosephsatlanta.org/images/aNav07.gif',
			  'http://www.stjosephsatlanta.org/images/bNav01_r.gif','http://www.stjosephsatlanta.org/images/bNav01.gif',
			  'http://www.stjosephsatlanta.org/images/bNav02_r.gif','http://www.stjosephsatlanta.org/images/bNav02.gif',
			  'http://www.stjosephsatlanta.org/images/bNav03_r.gif','http://www.stjosephsatlanta.org/images/bNav03.gif',
			  'http://www.stjosephsatlanta.org/images/bNav04_r.gif','http://www.stjosephsatlanta.org/images/bNav04.gif',
			  'http://www.stjosephsatlanta.org/images/bNav05_r.gif','http://www.stjosephsatlanta.org/images/bNav05.gif',
			  'http://www.stjosephsatlanta.org/images/bNav06_r.gif','http://www.stjosephsatlanta.org/images/bNav06.gif',
			  'http://www.stjosephsatlanta.org/images/links/HealthLibrary_r.gif','http://www.stjosephsatlanta.org/images/links/HealthLibrary.gif',
			  'http://www.stjosephsatlanta.org/images/links/medical_services_r.gif','http://www.stjosephsatlanta.org/images/links/medical_services.gif',
			  'http://www.stjosephsatlanta.org/images/links/find_a_physician_r.gif','http://www.stjosephsatlanta.org/images/links/find_a_physician.gif',
			  'http://www.stjosephsatlanta.org/images/links/heart_and_vascular_institute_r.gif','http://www.stjosephsatlanta.org/images/links/heart_and_vascular_institute.gif',
			  'http://www.stjosephsatlanta.org/images/links/cancer_center_r.gif','http://www.stjosephsatlanta.org/images/links/cancer_center.gif',
			  'http://www.stjosephsatlanta.org/images/links/quality_and_clinical_excellence_r.gif','http://www.stjosephsatlanta.org/images/links/quality_and_clinical_excellence.gif',
			  'http://www.stjosephsatlanta.org/images/links/events_and_screenings_r.gif','http://www.stjosephsatlanta.org/images/links/events_and_screenings.gif',
			  'http://www.stjosephsatlanta.org/images/links/mercy_care_services_r.gif','http://www.stjosephsatlanta.org/images/links/mercy_care_services.gif',
			  'http://www.stjosephsatlanta.org/images/links/Clinical_Trials_and_Research_r.gif','http://www.stjosephsatlanta.org/images/links/clinical_trials_and_research.gif',
			  'http://www.stjosephsatlanta.org/images/links/about_saint_joseph_r.gif','http://www.stjosephsatlanta.org/images/links/about_saint_joseph.gif'
			  );

function swapImgRestore() { //v3.0
  var i,x,a=document.sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.p) d.p=new Array();
    var i,j=d.p.length,a=preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.p[j]=new Image; d.p[j++].src=a[i];}}
}

function findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function swapImage() { //v3.0
  var i,j=0,x,a=swapImage.arguments; document.sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=findObj(a[i]))!=null){document.sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// REMOVE IE LINK BOX //

function CSRemoveIEbox(){
if (document.images&&navigator.userAgent.indexOf("MSIE")!=-1){
	for(i=0;i<document.links.length;i++){
		target=eval("document.links[i]")
		target.onfocus=blurHandler
		}
	}
}

function blurHandler(){
obj=window.event.srcElement
if(obj.tagName == "A"||obj.tagName=="AREA") obj.blur()
}

function fncSubmit(obj,url) {
	var req = obj.required_fields;
	var submitflag = true;
	var notice = "Some of the required fields are blank:\n\n";
	if (req) {
		//Means the required fields are present, let's check for values
		var arrFields = obj.required_fields.value.split("|")
		for(var x=0; x<=arrFields.length-1; x++) {
			var arrName = arrFields[x].split(",");
			
			var str = "if (obj."+arrName[0]+".value == '') { notice += '-->  "+arrName[1]+"\n'; submitflag = false;}";
			eval(str);
		}
		notice += "\nPlease fill in these fields and resubmit!"
	} else {
		//Means there isn't a required fields parameter; keep going
	}
	if (submitflag) {
		obj.action = url;
		obj.submit();
	} else {
		alert(notice);
	}
}

function fncCenteredChildWindow(URL,vHeight,vWidth,vScroll,vStatus) {
	if (screen.width) {
		var winl=(screen.width-vWidth)/2;
		var wint=(screen.height-vHeight)/2;
	} else { 
		winl=0;wint=0;
	}
	if(winl<0)winl=0;
	if(wint<0)wint=0;
	window.open(URL,'myWin','height='+vHeight+',width='+vWidth+',scrollbars='+vScroll+',status='+vStatus+',top='+wint+',left='+winl+',resizable=no')
}

