<!--
var oDoc = document;
var bNS4 = Boolean(oDoc.layers), bIE = Boolean(oDoc.all), bStandard = Boolean(oDoc.getElementById);

function activeXfix(){
	theObjects = document.getElementsByTagName("object"); 
	for (var i = 0; i < theObjects.length; i++) { 
		//alert(theObjects[i].outerHTML);
		theObjects[i].outerHTML = theObjects[i].outerHTML; 
	}
}

function checkit(aForm,aValue) {
	for (i=0;i<document.forms[aForm].orderitem.length;i++) {
		if (document.forms[aForm].orderitem[i].value==aValue) {
			document.forms[aForm].orderitem[i].checked = true;
		}
	}
	//top.location.href='#cb';
}


function disableall(){
	
	var arrElement = new Array('A','INPUT','SELECT'), i=0, input, count=0;
	for (var n=0;n<arrElement.length;n++) {
		input = document.getElementsByTagName(arrElement[n]);
		count = input.length;
		for (var i=0;i<count;i++) {
		if (arrElement[n]=='A') {
			input[i].removeAttribute("href");
			//input[i].style.cursor='default'; 
		} else if ((arrElement[n]=='INPUT') || (arrElement[n]=='SELECT')) {
			input[i].disabled='true';
		}}
	}
	return true;
} 
function printWindow() {
	if (!bNS4) window.print();
}

function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}

//function setCookie(name, value, nDays, path, domain) {
function setCookie(name, value, domain) {
var today = new Date(), expires = new Date(), nDays = 0;
if (nDays==null || nDays==0) nDays=365;
 expires.setTime(today.getTime() + 3600000*24*nDays);

  var curCookie = name + "=" + escape(value) + "; path=/" + 
  	((domain) ? "; domain=" + domain : "") + 
	((expires) ? "; expires=" + expires.toGMTString() : "") + ";";
  document.cookie = curCookie;  
}
function deleteCookie(name, domain) {
  if (getCookie(name)) {
    var curCookie = name + "=; path=/" + 
  	((domain) ? "; domain=" + domain : "") + 
	"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	document.cookie = curCookie;
	//alert(curCookie + '-delete');
  }
}  

function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}

function clearText(aObj,aText) {
	if (aObj.value==aText) {aObj.value='';}	
}

function putText(aObj,aText) {
	if (aObj.value=='') {aObj.value=aText;}	
}

function MM_findValue(f,n) {
	var frm=document.forms[f],e=frm.elements[n],t=e.type,v='';
	//alert(t);
	if (t==undefined){
		t = e[0].type;
		if (t=='checkbox') {
			for (i=0;i<e.length;i++){
			if (e[i].checked==true){
				if (v!='') v += ', '
				v += e[i].value;
			}}		
		} else if(t=='radio') {
			for (i=0;i<e.length;i++){
			if (e[i].checked==true){
				v = e[i].value;
				break; //exist for loop, as target acquired.
			}}
		}
	} else if (t=='select-one') {
		if (e.selectedIndex!=-1) v = e.options[e.selectedIndex].value;
	} else if (t=='checkbox') {
		if (e.checked == true) v = e.value;	
	} else if(t=='radio') {
		if (e.checked == true) v = e.value;	
	} else if ((t=='text') || (t=='textarea') || (t=='button') || (t=='password') || (t=='file')) {
		v = e.value;
	}
	return v;	
}
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_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];}
}

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_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,label,errors='',errorsEmail='',errors2='',args=MM_validateForm.arguments;
  var frm=args[0];
  for (i=1; i<(args.length-2); i+=3) { test=args[i+2]; 
  	val=MM_findValue(frm,args[i]); label=args[i+1];
	nm=args[i];
	if(test.indexOf('isHCP')!=-1){
		if(val!='1') { errors2 += '- Please confirm that you are a Health Care Physician.\n';  }  
	}else if (val!='') {
      if(test.indexOf('isSame')!=-1){
		if(val!=document.forms[frm].elements['C' + nm].value) { errors2 += '- E-mail Address and Confirm E-mail Address are different.\n';  }  
	  }
	  if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');q=val.indexOf('.');
		if (p<1 || p==(val.length-1)) errorsEmail='- '+label+' must contain an e-mail address.\n';
		if (q<1 || q==(val.length-1)) errorsEmail='- '+label+' must contain an e-mail address.\n';
      } else if (test!='R') {
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (val<min || max<val) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    }}} else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; 
  } 
  
  if (errors) { 
  	//alert(errors);
	alert('Please complete all required fields.');
  }else if (errorsEmail) {
   	alert(errorsEmail);
	errors = 'emailerror';
  }else if (errors2) {
   	alert(errors2);
	errors = 'uniqueerror';
  }
  document.MM_returnValue = (errors == '');
}

function openWindow(aURL, aWindow, aProperties){
	if (aProperties=='gene')aProperties='width=785,height=600,resizable=1,scrollbars=1,titlebar=1,directories=1,location=1,menubar=1,toolbar=1;status=1';
	if (aProperties=='popup')aProperties='width=515,height=268';
	if (aProperties=='')aProperties='width=785,height=600,resizable=1,scrollbars=1,titlebar=1';
	
	var childWindow=open(aURL,aWindow,aProperties);
    if (childWindow.opener == null) childWindow.opener = self;
	childWindow.focus();
}

function changeVisible(aObj,aForm,aID) {
	var aVisible='';
	if (aObj.options[aObj.selectedIndex].value=='Other') {
		aVisible = 'visible';
	} else {
		aVisible = 'hidden';
		document.forms[aForm].elements[aID].value='';
	}
	if (!bNS4) {
		if (document.getElementById(aID)) {
			var element = document.getElementById(aID);
			element.style.visibility = aVisible;
		}
	}
}
function onInput() {
	var args=onInput.arguments, frm = document.forms[args[0]], aID='', aValue='';
	for (i=1; i<(args.length-1); i+=2) { 
		aID=args[i],aValue=args[i+1];
		frm.elements[aID].value = aValue;
		//alert(aID + '-' + frm.elements[aID].value);
	}
}
function checkClear(aObj,aForm,aID) {
	if (aObj.checked == false) {
		var aElement = document.forms[aForm].elements[aID];
		for (var i=0;i<aElement.length;i++){
		if (aElement[i].checked==true){
			aElement[i].checked = false;
		}}
	}
}

function changeClass(aID,aClass) {
	if (!bNS4) {
		if (document.getElementById(aID)) {
			var element = document.getElementById(aID);
			element.className = aClass;
		}
	}
}
//-->