
i=10590;

function RedirectToReg(filename, typename)
{
	alert(filename + ' ' + typename);
}
//alert('xxxx');

function printWindow()
{
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}


function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=770,height=840,left = 340,top = 0');");
}
function popUpPharm(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=810,height=800,left = 340,top = 0');");
}
function popUpWalgreens(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=510,height=540,left = 340,top = 0');");
}
function popUpTyson(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=620,height=490,left = 340,top = 0');");
}
function popUp1(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=565,height=650,left = 340,top = 0');");
}
function popUp63(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=800,height=650,left = 0, top = 0');");
}
var arrTemp=self.location.href.split("?");
   var picUrl = (arrTemp.length>0)?arrTemp[1]:"";
   var NS = (navigator.appName=="Netscape")?true:false;

     function FitPic() {
       iWidth = (NS)?window.innerWidth:document.body.clientWidth;
       iHeight = (NS)?window.innerHeight:document.body.clientHeight;
       iWidth = document.images[0].width - iWidth;
       iHeight = document.images[0].height - iHeight;
       window.resizeBy(iWidth, iHeight);
       self.focus();
     }; 
	 
	 function PopupPic(sPicURL) { 
				window.open("popup.htm?"+sPicURL, "", "resizable=1,HEIGHT=10,WIDTH=1,scrollbars='+scroll+',menubar=0");
			}
			
function footer(N) {
newWindow = window.open(N, 'popD','toolbar=no,menubar=no,resizable=yes,scrollbars=yes,status=no,location=no,width=400,height=220');
}
function pressreleases(N) {
newWindow = window.open(N, 'popD','toolbar=no,menubar=no,resizable=yes,scrollbars=yes,status=no,location=no,width=450,height=550');
}

function FlashControl(DivID, WIDTH, HEIGHT, URL)
{
  var d = document.getElementById(DivID);
  d.innerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width=' + WIDTH + ' height=' + HEIGHT +'><param name="movie" value=' + URL + '?s=' + movieNumber + '><param name="quality" value="high" /><embed src=' + URL + ' quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width=' + WIDTH + ' height=' + HEIGHT +'></embed></object>';
}

function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split("&");
  for (var i=0;i<vars.length;i++) {
    var pair = vars[i].split("=");
    if (pair[0] == variable) {
      return pair[1];
    }
  } 
}

function something(){
	alert('fff');	
}

function checkFields(){
	var missingFields = "";
    for(i = 0; i < rFields.length; i++){
        elem = document.getElementById(rFields[i]);
        if(elem != null){
            if(elem.value == ""){
                alert("You are missing one or more required field(s)");
                return false;
            }
        }
    }
    return true;
}

function LoadSearchEngineStuff(){
    hiLeadSource2 = document.getElementById('00N00000006uR1D');
    if(hiLeadSource2 == null)
        return;
    if(getQueryVariable("goog") != null){
        hiLeadSource2.value = "Google";
    }
    else if(getQueryVariable("yahoo") != null){
        hiLeadSource2.value = "Yahoo";    
    }
    else if(getQueryVariable("business") != null){
        hiLeadSource2.value = "Business";    
    }
    else{
        hiLeadSource2.value = "";
    }
}