var clName = navigator.appName.indexOf('Explorer') > -1 ?  "className" : "class" ;
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages(a,b) {
	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) {
		health_over = newImage("images/corp/health-over.gif");
		beauty_over = newImage("images/corp/beauty-over.gif");
		healing_over = newImage("images/corp/healing-over.gif");
		renewal_over = newImage("images/corp/renewal-over.gif");
		stars_over = newImage("images/corp/stars-over.gif");
		aboutus_over = newImage("images/corp/aboutus-over.gif");
		appoints_over = newImage("images/corp/appoints-over.gif");
		about_over = newImage("images/corp/about-over.gif");
		schwartz_over = newImage("images/corp/schwartz-over.gif");
		staff_over = newImage("images/corp/staff-over.gif");
		startreat_over = newImage("images/corp/startreat-over.gif");
		contact_over = newImage("images/corp/contact-over.gif");
		appoint_over = newImage("images/corp/appoint-over.gif");
		preloadFlag = true;
	}
}
function changenavStyle(brdr,ch){
 if(ch){
     document.getElementById(brdr).style.backgroundColor = "#F9F7EF";
	     }else{
          document.getElementById(brdr).style.backgroundColor = "#C9CACB";
	          }
 }
 
 function replace(str, from, to) {
    var i = str.indexOf(from);
    if (!from || !str || i == -1) return str;
    var newstr = str.substring(0, i) + to;
    if (i+from.length < str.length)
        newstr += replace(str.substring(
        i+from.length,str.length),from,to);
    return newstr;
}
function getQry(nm)
{
    if (!location.search) return '';
    var i, j, qry;
    qry = location.search.substring(1);
    i = qry.indexOf(nm)+nm.length+1;
    if (i == nm.length) return '';
    j = qry.indexOf('&',i);
    if (j+1) qry = qry.substring(i,j);
    else     qry = qry.substring(i);
    return unescape(replace(qry, '+', ' '));
}

function substitute(str, from, to) {
    var i = str.indexOf(from);
    if (!from || !str || i == -1) return str;
    var newstr = str.substring(0, i);
    if (i+from.length < str.length)
        newstr += replace(str.substring(
        i+from.length,str.length),from);
    return newstr;

}
function convert(nm)
{
    if (!location.search) return '';
    var i, j, qry;
    qry = location.search.substring(1);
    i = qry.indexOf(nm)+nm.length+1;
    if (i == nm.length) return '';
    j = qry.indexOf('&',i);
    if (j+1) qry = qry.substring(i,j);
    else     qry = qry.substring(i);
    return unescape(substitute(qry, '+'));
}
 
 function subWords(){
          if(getQry("cosmeticdvd")){
		    document.contactus.subject.value = "Please Send Me My Free DVD";
			document.contactus.comments.value = "Please Insert Mailing Address Here";
		               }
		  if(getQry("neurodvd")){
		    document.contactus.subject.value = "Please Send Me My Free DVD";
			document.contactus.comments.value = "Please Insert Mailing Address Here";
		               }
 
 }
function openVideo(vidpage) {
window.open( vidpage, "myWindow", "status = 0, height = 415, width = 480, toolbar=0,scrollbars=0,location=0,status=0,menubars=0,resizable=0" )
}
//-->
// -->

