
document.write("<LINK REL=stylesheet HREF=\"/css/styles.css\" TYPE=\"text/css\">");

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_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) { //v3.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=MM_findObj(n,d.layers[i].document); 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_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+"where_to_buy_detail.php?st="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function regPop(url) {
if (window.screen) {
if ((navigator.appVersion.indexOf("Mac") != -1) && ((navigator.appName == "Netscape") && !(navigator.userAgent.indexOf('Safari')!= -1))) {
	var winwidth=696
	var winheight=600
	var finalw = (screen.width-winwidth)/2
	var finalh = (screen.height-winheight)/2

	
msgWindow=open(url+'/product_registration.php','regwin','width='+winwidth+',height='+winheight+',screenX='+finalw+',screenY='+finalh+',top='+finalh+',left='+finalw+',resizable=yes,scrollbars=yes');
  	msgWindow.opener = self; 
}
else {
	var winwidth=696
	var winheight=600
	var finalw = (screen.availWidth-winwidth)/2
	var finalh = (screen.availHeight-winheight)/2

	
msgWindow=open(url+'/product_registration.php','regwin','width='+winwidth+',height='+winheight+',screenX='+finalw+',screenY='+finalh+',top='+finalh+',left='+finalw+',resizable=yes,scrollbars=yes');
  	msgWindow.opener = self; 
}
}
else {
	msgWindow=open('/product_registration.php','regwin','resizable=yes,scrollbars=yes,width=696,height=600'); 
  	msgWindow.opener = self; 
}
}
function regPopResize() {
if (window.screen) {
if ((navigator.appVersion.indexOf("Mac") != -1) && ((navigator.appName == "Netscape") && !(navigator.userAgent.indexOf('Safari')!= -1))) {
	var winwidth=696
	var winheight=600
	window.innerWidth = winwidth
	window.innerHeight = winheight
	window.screenX = (screen.availWidth-winwidth)/2;
	window.screenY = (screen.availHeight-winheight)/2;
}
else {
	var winwidth=696
	var winheight=600
    var ww = (screen.availWidth - winwidth)/2;
    var wh = (screen.availHeight - winheight)/2;
    window.moveTo(ww, wh);
    window.resizeTo(winwidth, winheight);

}
}
}
function requestPop(str,url) {
if(!str) str= '';
if (window.screen) {
if ((navigator.appVersion.indexOf("Mac") != -1) && ((navigator.appName == "Netscape") && !(navigator.userAgent.indexOf('Safari')!= -1))) {
	var winwidth=696
	var winheight=600
	var finalw = (screen.width-winwidth)/2
	var finalh = (screen.height-winheight)/2

	
msgWindow=open(url+'/request_form.php?frm='+str,'requestwin','width='+winwidth+',height='+winheight+',screenX='+finalw+',screenY='+finalh+',top='+finalh+',left='+finalw+',resizable=yes,scrollbars=yes');
  	msgWindow.opener = self; 
}
else {
	var winwidth=696
	var winheight=600
	var finalw = (screen.availWidth-winwidth)/2
	var finalh = (screen.availHeight-winheight)/2

	
msgWindow=open(url+'/request_form.php?frm='+str,'requestwin','width='+winwidth+',height='+winheight+',screenX='+finalw+',screenY='+finalh+',top='+finalh+',left='+finalw+',resizable=yes,scrollbars=yes');
  	msgWindow.opener = self; 
}
}
else {
	msgWindow=open(url+'/request_form.php?frm='+str,'requestwin','resizable=yes,scrollbars=yes,width=696,height=600'); 
  	msgWindow.opener = self; 
}
}

function emailPop(pid,whatsnew) {
whatsnewlink = null;
if (whatsnew) whatsnewlink = '&whatsnew=1';

if (window.screen) {
if ((navigator.appVersion.indexOf("Mac") != -1) && ((navigator.appName == "Netscape") && !(navigator.userAgent.indexOf('Safari')!= -1))) {
	var winwidth=696
	var winheight=520
	var finalw = (screen.width-winwidth)/2
	var finalh = (screen.height-winheight)/2

	msgWindow=open('/tell_a_friend.php?pid='+pid+whatsnewlink,'emailwin','width='+winwidth+',height='+winheight+',screenX='+finalw+',screenY='+finalh+',top='+finalh+',left='+finalw+',resizable=no,scrollbars=yes');
  	msgWindow.opener = self; 
}
else {
	var winwidth=696
	var winheight=520
	var finalw = (screen.availWidth-winwidth)/2
	var finalh = (screen.availHeight-winheight)/2

	msgWindow=open('/tell_a_friend.php?pid='+pid+whatsnewlink,'emailwin','width='+winwidth+',height='+winheight+',screenX='+finalw+',screenY='+finalh+',top='+finalh+',left='+finalw+',resizable=no,scrollbars=yes');
  	msgWindow.opener = self; 
}
}
else {
	msgWindow=open('/tell_a_friend.php?pid='+pid+whatsnewlink,'emailwin','resizable=yes,scrollbars=yes,width=696,height=520'); 
  	msgWindow.opener = self; 
}
}

function confirmPop() {
if (window.screen) {
if ((navigator.appVersion.indexOf("Mac") != -1) && ((navigator.appName == "Netscape") && !(navigator.userAgent.indexOf('Safari')!= -1))) {
	var winwidth=415
	var winheight=258
	window.innerWidth = winwidth
	window.innerHeight = winheight
	window.screenX = (screen.availWidth-winwidth)/2;
	window.screenY = (screen.availHeight-winheight)/2;
}
else {
	var winwidth=415
	var winheight=288
    var ww = (screen.availWidth - winwidth)/2;
    var wh = (screen.availHeight - winheight)/2;
    window.moveTo(ww, wh);
    window.resizeTo(winwidth, winheight);

}
}
}

function cvv2Pop() {
if (window.screen) {
if ((navigator.appVersion.indexOf("Mac") != -1) && ((navigator.appName == "Netscape") && !(navigator.userAgent.indexOf('Safari')!= -1))) {
	var winwidth=500
	var winheight=600
	window.innerWidth = winwidth
	window.innerHeight = winheight
	window.screenX = (screen.availWidth-winwidth)/2;
	window.screenY = (screen.availHeight-winheight)/2;
}
else {
	var winwidth=500
	var winheight=600
    var ww = (screen.availWidth - winwidth)/2;
    var wh = (screen.availHeight - winheight)/2;
    window.moveTo(ww, wh);
    window.resizeTo(winwidth, winheight);

}
}
}
/*************************************************************************
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  Copyright 2001-3 by Sharon Paine 
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/
//the is for the image rotation on the company: facilities page
function initImgRotation() {
	if (document.leftimage)
	{
  // create rotating image objects here 
  // arguments: image name, rotation speed
  var rotator1 = new rotateImgObj('leftimage',5000);
  // add the images to rotate into that image object  
  rotator1.addImages("facilities_image2.jpg","facilities_image1.jpg");
  rotator1.rotate();
  
  rotateImgObj.start();
}
}

// If all the images you wish to display are in the same location, you can specify the path here 
rotateImgObj.imagesPath = "/media/company/";

// no need to edit code below 
/////////////////////////////////////////////////////////////////////
rotateImgObjs = []; // holds all rotating image objects defined
// constructor 
function rotateImgObj(nm,s) {
  this.speed=s; this.ctr=0; this.timer=5000;  
  this.imgObj = document.images[nm]; // get reference to the image object
  this.index = rotateImgObjs.length; rotateImgObjs[this.index] = this;
  this.animString = "rotateImgObjs[" + this.index + "]";
}

rotateImgObj.prototype = {
  addImages: function() { // preloads images
    this.imgObj.imgs = [];
    for (var i=0; arguments[i]; i++) {
      this.imgObj.imgs[i] = new Image();
      this.imgObj.imgs[i].src = rotateImgObj.imagesPath + arguments[i];
    }
  },

  rotate: function() {
    if (this.ctr < this.imgObj.imgs.length-1) this.ctr++;
    else this.ctr = 0;
    this.imgObj.src = this.imgObj.imgs[this.ctr].src;
  }
}

// sets up rotation for all defined rotateImgObjs
rotateImgObj.start = function() {
  for (var i=0; i<rotateImgObjs.length; i++) 
    rotateImgObjs[i].timer = setInterval(rotateImgObjs[i].animString + ".rotate()", rotateImgObjs[i].speed);                     
}
// end rotate image functions

// begin select boxes code (for featured_partners_detail.html page in the admin)
function copySelectedOptions(from,to){var options = new Object();for(var i=0;i<to.options.length;i++){options[to.options[i].value] = to.options[i].text;}for(var i=0;i<from.options.length;i++){var o = from.options[i];if(o.selected){if(options[o.value] == null || options[o.value] == "undefined" || options[o.value]!=o.text){to.options[to.options.length] = new Option( o.text, o.value, false, false);}}}if((arguments.length<3) ||(arguments[2]==true)){sortSelect(to);}from.selectedIndex = -1;to.selectedIndex = -1;}

function removeSelectedOptions(from){for(var i=(from.options.length-1);i>=0;i--){var o=from.options[i];if(o.selected){from.options[i] = null;}}from.selectedIndex = -1;}
// end select boxes code

// begin faq image popup code
function faqPopup(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=440,height=210,left = 426,top = 407.5');");
}
// end faq image popup code

// begin popups to sunpro and kalequip notices
function sitePop(site) {

if (window.screen) {
if ((navigator.appVersion.indexOf("Mac") != -1) && ((navigator.appName == "Netscape") && !(navigator.userAgent.indexOf('Safari')!= -1))) {
	var winwidth=600
	var winheight=400
	var finalw = (screen.width-winwidth)/2
	var finalh = (screen.height-winheight)/2

	msgWindow=open('/site_popup.php?site='+site,'sitewin','width='+winwidth+',height='+winheight+',screenX='+finalw+',screenY='+finalh+',top='+finalh+',left='+finalw+',resizable=no,scrollbars=no');
  	msgWindow.opener = self; 
}
else {
	var winwidth=600
	var winheight=400
	var finalw = (screen.availWidth-winwidth)/2
	var finalh = (screen.availHeight-winheight)/2

	msgWindow=open('/site_popup.php?site='+site,'sitewin','width='+winwidth+',height='+winheight+',screenX='+finalw+',screenY='+finalh+',top='+finalh+',left='+finalw+',resizable=no,scrollbars=no');
  	msgWindow.opener = self; 
}
}
else {
	msgWindow=open('/site_popup.php?site='+site,'sitewin','resizable=yes,scrollbars=yes,width=600,height=400'); 
  	msgWindow.opener = self; 
}
}
// end popups to sunpro and kalequip notices

// begin popups to terms & conditions and privacy policy popups
function cartPop(URL) {

if (window.screen) {
if ((navigator.appVersion.indexOf("Mac") != -1) && ((navigator.appName == "Netscape") && !(navigator.userAgent.indexOf('Safari')!= -1))) {
	var winwidth=696
	var winheight=600
	var finalw = (screen.width-winwidth)/2
	var finalh = (screen.height-winheight)/2

	msgWindow=open(URL,'cartwin','width='+winwidth+',height='+winheight+',screenX='+finalw+',screenY='+finalh+',top='+finalh+',left='+finalw+',resizable=no,scrollbars=yes');
  	msgWindow.opener = self; 
}
else {
	var winwidth=696
	var winheight=600
	var finalw = (screen.availWidth-winwidth)/2
	var finalh = (screen.availHeight-winheight)/2

	msgWindow=open(URL,'sitewin','width='+winwidth+',height='+winheight+',screenX='+finalw+',screenY='+finalh+',top='+finalh+',left='+finalw+',resizable=no,scrollbars=yes');
  	msgWindow.opener = self; 
}
}
else {
	msgWindow=open(URL,'emailwin','resizable=yes,scrollbars=yes,width=696,height=520'); 
  	msgWindow.opener = self; 
}
}
// end popups to terms & conditions and privacy policy popups
function focusField(){
    if(document.regform){
        document.regform.first_name.focus();
    }
}
