
<!--
function MM_preloadimages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadimages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  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=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// Random Image Generator
var image = new Array(
	'21',
	'21',
	'21'
);

var n = image.length;

function RandomImage() {
    return(image[Math.floor(Math.random()*n)]);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function rollon() {
el = event.srcElement ;
if (el.getAttribute("roll") != null) {
el.className = "onit" ;
}
}

function rolloff() {
el = event.srcElement ;
if (el.getAttribute("roll") != null) {
el.className = "offit";
}
}

document.onmouseover = rollon ;
document.onmouseout = rolloff ;


function build_nav (siteid, sectionid) {
if (siteid==2) {
	document.write("<tr><td colspan=\"2\" valign=\"bottom\">");
	if (sectionid == "home") {
		document.write("<a href='home.asp?id=2'><img src=\"images/hospital_header_home_on.gif\" name=\"header\" border=\"0\" onMouseOver=\"document.header.src='images/hospital_header_home_on.gif';\" onMouseOut=\"document.header.src='images/hospital_header_home_on.gif';\"></a>");
	} else {
		document.write("<a href='home.asp?id=2'><img src=\"images/hospital_header_home_off.gif\" name=\"header\" border=\"0\" onMouseOver=\"document.header.src='images/hospital_header_home_on.gif';\" onMouseOut=\"document.header.src='images/hospital_header_home_off.gif';\"></a>");
	}
	if (sectionid == "career") {
		document.write("<a href='career.asp?id=2'><img src=\"images/hospital_header_login_on.gif\" name=\"career\" border=\"0\" onMouseOver=\"document.career.src='images/new/hospital_header_login_on.gif';\" onMouseOut=\"document.career.src='images/new/hospital_header_login_on.gif';\"></a>");
	} else {
		document.write("<a href='career.asp?id=2'><img src=\"images/hospital_header_login_off.gif\" name=\"career\" border=\"0\" onMouseOver=\"document.career.src='images/new/hospital_header_login_on.gif';\" onMouseOut=\"document.career.src='images/new/hospital_header_login_off.gif';\"></a>");
	}
	
	if (sectionid == "info") {
		document.write("<a href='hosin.asp?id=2'><img src=\"images/hospital_header_hosin_on.gif\" name=\"phyin\" border=\"0\" onMouseOver=\"document.phyin.src='images/hospital_header_hosin_on.gif';\" onMouseOut=\"document.phyin.src='images/hospital_header_hosin_on.gif';\"></a>");
	} else {
		document.write("<a href='hosin.asp?id=2'><img src=\"images/hospital_header_hosin_off.gif\" name=\"phyin\" border=\"0\" onMouseOver=\"document.phyin.src='images/hospital_header_hosin_on.gif';\" onMouseOut=\"document.phyin.src='images/hospital_header_hosin_off.gif';\"></a>");
	}
	
	if (sectionid == "today") {
		document.write("<a href='today.asp?id=2'><img src=\"images/hospital_header_today_on.gif\" name=\"today\" border=\"0\" onMouseOver=\"document.today.src='images/hospital_header_today_on.gif';\" onMouseOut=\"document.today.src='images/hospital_header_today_on.gif';\"></a>");
	} else {
		document.write("<a href='today.asp?id=2'><img src=\"images/hospital_header_today_off.gif\" name=\"today\" border=\"0\" onMouseOver=\"document.today.src='images/hospital_header_today_on.gif';\" onMouseOut=\"document.today.src='images/hospital_header_today_off.gif';\"></a>");
	}
	
	if (sectionid == "resources") {
		document.write("<a href='res.asp?id=2'><img src=\"images/hospital_header_resourc_on.gif\" name=\"res\" border=\"0\" onMouseOver=\"document.res.src='images/hospital_header_resourc_on.gif';\" onMouseOut=\"document.res.src='images/hospital_header_resourc_on.gif';\"></a>");
	} else {
		document.write("<a href='res.asp?id=2'><img src=\"images/hospital_header_resourc_off.gif\" name=\"res\" border=\"0\" onMouseOver=\"document.res.src='images/hospital_header_resourc_on.gif';\" onMouseOut=\"document.res.src='images/hospital_header_resourc_off.gif';\"></a>");
	}
	
	if (sectionid == "about") {
		document.write("<a href='about.asp?id=2'><img src=\"images/hospital_header_about_on.gif\" name=\"about\" border=\"0\" onMouseOver=\"document.about.src='images/hospital_header_about_on.gif';\" onMouseOut=\"document.about.src='images/hospital_header_about_on.gif';\"></a>");
	} else {
		document.write("<a href='about.asp?id=2'><img src=\"images/hospital_header_about_off.gif\" name=\"about\" border=\"0\" onMouseOver=\"document.about.src='images/hospital_header_about_on.gif';\" onMouseOut=\"document.about.src='images/hospital_header_about_off.gif';\"></a>");
	}
	
	if (sectionid == "contact") {
		document.write("<a href='contact.asp?id=2'><img src=\"images/hospital_header_con_on.gif\" name=\"con\" border=\"0\" onMouseOver=\"document.con.src='images/hospital_header_con_on.gif';\" onMouseOut=\"document.con.src='images/hospital_header_con_on.gif';\"></a>");
	} else {
		document.write("<a href='contact.asp?id=2'><img src=\"images/hospital_header_con_off.gif\" name=\"con\" border=\"0\" onMouseOver=\"document.con.src='images/hospital_header_con_on.gif';\" onMouseOut=\"document.con.src='images/hospital_header_con_off.gif';\"></a>");
	}
	
	document.write("</td></tr>");
} else {
////////////////////////////////////////////////////////////////////////////
	document.write("<tr><td colspan=\"2\" valign=\"bottom\">");
	if (sectionid == "home") {
		document.write("<a href='home.asp?id=1'><img src=\"images/physician_header_home_on.gif\" name=\"header\" border=\"0\" onMouseOver=\"document.header.src='images/physician_header_home_on.gif';\" onMouseOut=\"document.header.src='images/physician_header_home_on.gif';\"></a>");
	} else {
		document.write("<a href='home.asp?id=1'><img src=\"images/physician_header_home_off.gif\" name=\"header\" border=\"0\" onMouseOver=\"document.header.src='images/physician_header_home_on.gif';\" onMouseOut=\"document.header.src='images/physician_header_home_off.gif';\"></a>");
	}
	if (sectionid == "career") {
		document.write("<a href='career.asp?id=1'><img src=\"images/physician_header_career_on.gif\" name=\"career\" border=\"0\" onMouseOver=\"document.career.src='images/physician_header_career_on.gif';\" onMouseOut=\"document.career.src='images/physician_header_career_on.gif';\"></a>");
	} else {
		document.write("<a href='career.asp?id=1'><img src=\"images/physician_header_career_off.gif\" name=\"career\" border=\"0\" onMouseOver=\"document.career.src='images/physician_header_career_on.gif';\" onMouseOut=\"document.career.src='images/physician_header_career_off.gif';\"></a>");
	}
	
	if (sectionid == "info") {
		document.write("<a href='phyin.asp?id=1'><img src=\"images/physician_header_phyin_on.gif\" name=\"phyin\" border=\"0\" onMouseOver=\"document.phyin.src='images/physician_header_phyin_on.gif';\" onMouseOut=\"document.phyin.src='images/physician_header_phyin_on.gif';\"></a>");
	} else {
		document.write("<a href='phyin.asp?id=1'><img src=\"images/physician_header_phyin_off.gif\" name=\"phyin\" border=\"0\" onMouseOver=\"document.phyin.src='images/physician_header_phyin_on.gif';\" onMouseOut=\"document.phyin.src='images/physician_header_phyin_off.gif';\"></a>");
	}
	
	if (sectionid == "today") {
		document.write("<a href='today.asp?id=1'><img src=\"images/physician_header_today_on.gif\" name=\"today\" border=\"0\" onMouseOver=\"document.today.src='images/physician_header_today_on.gif';\" onMouseOut=\"document.today.src='images/physician_header_today_on.gif';\"></a>");
	} else {
		document.write("<a href='today.asp?id=1'><img src=\"images/physician_header_today_off.gif\" name=\"today\" border=\"0\" onMouseOver=\"document.today.src='images/physician_header_today_on.gif';\" onMouseOut=\"document.today.src='images/physician_header_today_off.gif';\"></a>");
	}
	
	if (sectionid == "resources") {
		document.write("<a href='res.asp?id=1'><img src=\"images/physician_header_res_on.gif\" name=\"res\" border=\"0\" onMouseOver=\"document.res.src='images/physician_header_res_on.gif';\" onMouseOut=\"document.res.src='images/physician_header_res_on.gif';\"></a>");
	} else {
		document.write("<a href='res.asp?id=1'><img src=\"images/physician_header_res_off.gif\" name=\"res\" border=\"0\" onMouseOver=\"document.res.src='images/physician_header_res_on.gif';\" onMouseOut=\"document.res.src='images/physician_header_res_off.gif';\"></a>");
	}
	
	if (sectionid == "about") {
		document.write("<a href='about.asp?id=1'><img src=\"images/physician_header_about_on.gif\" name=\"about\" border=\"0\" onMouseOver=\"document.about.src='images/physician_header_about_on.gif';\" onMouseOut=\"document.about.src='images/physician_header_about_on.gif';\"></a>");
	} else {
		document.write("<a href='about.asp?id=1'><img src=\"images/physician_header_about_off.gif\" name=\"about\" border=\"0\" onMouseOver=\"document.about.src='images/physician_header_about_on.gif';\" onMouseOut=\"document.about.src='images/physician_header_about_off.gif';\"></a>");
	}
	
	if (sectionid == "contact") {
		document.write("<a href='contact.asp?id=1'><img src=\"images/physician_header_con_on.gif\" name=\"con\" border=\"0\" onMouseOver=\"document.con.src='images/physician_header_con_on.gif';\" onMouseOut=\"document.con.src='images/physician_header_con_on.gif';\"></a>");
	} else {
		document.write("<a href='contact.asp?id=1'><img src=\"images/physician_header_con_off.gif\" name=\"con\" border=\"0\" onMouseOver=\"document.con.src='images/physician_header_con_on.gif';\" onMouseOut=\"document.con.src='images/physician_header_con_off.gif';\"></a>");
	}
	
	document.write("</td></tr>");
}


}

function subnav (section, page) {
	if (section == "what") {
		if (page == "demo") {state_demo = "boldtxton";} else {state_demo = "boldtxt";}
		if (page == "faqs") {state_faqs = "boldtxton";} else {state_faqs = "boldtxt";}
		if (page == "pricing") {state_pricing = "boldtxton";} else {state_pricing = "boldtxt";}
		if (page == "sample") {state_sample = "boldtxton";} else {state_sample = "boldtxt";}
		if (page == "info") {state_info = "boldtxton";} else {state_info = "boldtxt";}
		
		document.write("<a href='what_info.html' class='"+state_info+"'>Product Info</a><br>");
		document.write("<a href='what_demo.html' class='"+state_demo+"'>Demo</a><br>");
		document.write("<a href='what_faqs.html' class='"+state_faqs+"'>FAQs</a><br>");
		document.write("<a href='what_pricing.html' class='"+state_pricing+"'>Pricing</a><br>");
		document.write("<a href='what_sample.php' class='"+state_sample+"'>Request a Sample</a><br>");
		
	} else if (section == "about") {
		if (page == "newsletter") {state_newsletter = "boldtxton";} else {state_newsletter = "boldtxt";}
		if (page == "press") {state_press = "boldtxton";} else {state_press = "boldtxt";}
		if (page == "guarantee") {state_guarantee = "boldtxton";} else {state_guarantee = "boldtxt";}
		if (page == "contact") {state_contact = "boldtxton";} else {state_contact = "boldtxt";}
		if (page == "media") {state_media = "boldtxton";} else {state_media = "boldtxt";}
		
		//document.write("<a href='aboutus_newsletter.html' class='"+state_newsletter+"'>Letter from Mary (updated 12/21/04)</a><br>");
		document.write("<a href='http://homepage.mac.com/mmcphail/blogwavestudio/' target='new' class='"+state_newsletter+"'>Mary's Blog</a><br>");
		document.write("<a href='aboutus_press.html' class='"+state_press+"'>Press Room</a><br>");
		document.write("<a href='aboutus_guarantee.html' class='"+state_guarantee+"'>Our Guarantee</a><br>");
		document.write("<a href='aboutus_contact.html' class='"+state_contact+"'>Contact Us</a><br>");
		document.write("<a href='aboutus_media.html' class='"+state_media+"'>Media Kit</a><br>");
	}
}

function show() {
stra = window.location.search.substr(1).split("&"); 
where = stra[0].split("=");
return where[1];
}


function changeIt()
{
	// Ref: http://www.quirksmode.org/dom/changess.html
	if (!document.styleSheets) return;
	var theRules = new Array();
	if (document.styleSheets[1].cssRules)
		theRules = document.styleSheets[1].cssRules
	else if (document.styleSheets[1].rules)
		theRules = document.styleSheets[1].rules
	else return;
	theRules[theRules.length-1].style.backgroundColor = 'transparent';
	//document.styleSheets[0].previewTable.style.setProperty('background','#00cc00',null);
}





function get_preview(font_size) {

	newText = document.createfrm.gtext.value; 
	var re = new RegExp ('\n', 'gi') ;
	var newText = newText.replace(re, 'chr(13)') ;
	//$text=wordwrap($text,$wrappos,"\n\r",0);
	
	newCredit = document.createfrm.qcredit.value;
	
	newBgColor = document.createfrm.bgColor.value; 
	newBgColor = newBgColor.substring(1, newBgColor.length); 

	newTextColor = document.createfrm.textColor.value; 
	newTextColor = newTextColor.substring(1, newTextColor.length); 
	
	newgwidth = document.createfrm.gwidth.value; 
	newgheight = document.createfrm.gheight.value; 
	
	newImg = 'phpimage.php?text='+newText+'   &font_file=' + document.createfrm.font.options[document.createfrm.font.selectedIndex].value + '&font_size='+ font_size +'&font_color='+ newTextColor +'&background_color=' + newBgColor; 
	document.preview.src = newImg;
	
}

//document.getElementById(id).style.visibility; 

function visibilityToggle(id) { 
 var el = document.getElementById(id).style; 
 if(el.visibility == "hidden") { 
 el.visibility = "visible"; 
 } 
 else if(el.visibility == "visible") { 
 el.visibility = "hidden"; 
 } 
 } 
 
 
 function displayToggle(id) { 
var el = document.getElementById(id).style; 
if(el.display == "none") { 
el.display = "block"; 
} 
else if(el.display == "block") { 
el.display = "none"; 
} 
} 

function save_filename() {
	//alert(this.value);
	filename=document.frm.file.value; 
	nameLen = filename.length; 
	lastSlashPos = filename.lastIndexOf("\\"); 
	document.frm.jpg.value = filename.substring(lastSlashPos+1, nameLen); 
	//alert('lastSlashPos:' + lastSlashPos + ' nameLen:' + nameLen + ' ' + document.frm.jpg.value);
}


//-->

