function setOz(oz,name){
parent.document.getElementById("content").src="" + name +"?size=" + oz;
}

function viewData(bidno){
parent.document.getElementById("content").src="bottle.php" +"?bidno=" + bidno;
}
function viewDataCaps(cidno){
parent.document.getElementById("content").src="cap.php" +"?cidno=" + cidno;
}
function viewDataSprayer(sidno){
parent.document.getElementById("content").src="sprayer.php" +"?sidno=" + sidno;
}
function viewDataTrigger(tidno){
parent.document.getElementById("content").src="trigger.php" +"?tidno=" + tidno;
}
function submitrequest(bidno){
parent.document.getElementById("content").src="requestcomplete.php";
}

function popup(page,width,height)
{
var inst =  "width=" + width + ",height=" + height + ",resizeable=yes,scrollbars=yes,menubar=yes";
window.open(page,'',inst);
}

function popmap(urlin,title)
  {
    mapswin = window.open(urlin,title,'scrollbars,resizable,height=950,width=800');
	if (window.focus) {
	mapswin.focus();
	}
	return false;
}

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this header

isIE=document.all;
isNN=!document.all&&document.getElementById;
isN4=document.layers;
isHot=false;

function ddInit(e){
  topDog=isIE ? "BODY" : "HTML";

  myDog=isIE ? event.srcElement : e.target;
  while (myDog.id.substr(0,8)!="theLayer"&&myDog.tagName!=topDog){
      myDog=isIE ? myDog.parentElement : myDog.parentNode;
     }
      //alert('dfd: ' + myDog.id.substr(0,8));
  //if(myDog.id.substr(0,8) =="theLayer1"){
  //whichDog=isIE ? document.all.theLayer1 : document.getElementById("theLayer1");
  //}
 //else{
 // whichDog=isIE ? document.getElementById('theLayer2') : document.getElementById("theLayer2");
 // }
 //alert('dfd: ' + myDog.id);
  whichDog=isIE ? document.getElementById(myDog.id) : document.getElementById(myDog.id);


  hotDog=isIE ? event.srcElement : e.target;
  while (hotDog.id!="titleBar"&&hotDog.tagName!=topDog){
    hotDog=isIE ? hotDog.parentElement : hotDog.parentNode;
  }
  if (hotDog.id=="titleBar"){
    offsetx=isIE ? event.clientX : e.clientX;
    offsety=isIE ? event.clientY : e.clientY;
    nowX=parseInt(whichDog.style.left);
    nowY=parseInt(whichDog.style.top);
    ddEnabled=true;
    document.onmousemove=dd;
  }
}

function dd(e){
  if (!ddEnabled) return;
  whichDog.style.left=isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
  whichDog.style.top=isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
  return false;
}

function ddN4(whatDog){
  if (!isN4) return;
  N4=eval(whatDog);
  N4.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
  N4.onmousedown=function(e){
    N4.captureEvents(Event.MOUSEMOVE);
    N4x=e.x;
    N4y=e.y;
  }
  N4.onmousemove=function(e){
    if (isHot){
      N4.moveBy(e.x-N4x,e.y-N4y);
      return false;
    }
  }
  N4.onmouseup=function(){
    N4.releaseEvents(Event.MOUSEMOVE);
  }
}

function hideMe(layerVis){
  currentLay = document.getElementById(layerVis);
  if (isIE||isNN) currentLay.style.visibility="hidden";
  else if (isN4) document.currentLay.visibility="hide";
}

function showMe(layerVis){
  currentLay = document.getElementById(layerVis);
  if (isIE||isNN) currentLay.style.visibility="visible";
  else if (isN4) document.currentLay.visibility="show";
}

function hideMeGo(currentLay){
   if (isIE||isNN) currentLay.style.visibility="hidden";
  else if (isN4) document.currentLay.visibility="hide";
}

function showMeGo(layerVis){
  currentLay = document.getElementById(layerVis);
  if (isIE||isNN) currentLay.style.visibility="visible";
  else if (isN4) document.currentLay.visibility="show";
  setTimeout("hideMeGo(currentLay)", 10000);
}

document.onmousedown=ddInit;
document.onmouseup=Function("ddEnabled=false");
