var opnd=new Array()
opnd[0]=0;
opnd[1]=0;
opnd[2]=0;
opnd[3]=0;
var stopper_dd=new Array()
stopper_dd[0]=0;
stopper_dd[1]=0;
stopper_dd[2]=0;
stopper_dd[3]=0;
var goH=new Array();
goH[0]=0;
goH[1]=0;
goH[2]=0;
goH[3]=0;
var zD=new Array();
zD[0]='dd_products';
zD[1]='dd_customers';
zD[2]='dd_company';
zD[3]='dd_resources';
function ddM(obj,y,x,f){
if(opnd[f]==0){
for(i=0;i<4;i++){
if(i==f){
	document.getElementById(zD[i]).style.zIndex="11"
}
else{
	document.getElementById(zD[i]).style.zIndex="10"
}
}
opnd[f]=1;
goH[f]=1;
dropmenuobj=document.getElementById? document.getElementById(y) : y;
dropmenuobj.style.zIndex="11";
if(dropmenuobj.childNodes[1]){
sH=dropmenuobj.childNodes[1].childNodes[6].clientHeight+10
}
else{
sH=dropmenuobj.childNodes[0].childNodes[3].clientHeight+30
}
dropmenuobj.style.left=getposOffset(obj, "left")+3+"px"
dropmenuobj.style.top=getposOffset(obj, "top")+19+"px"
dropmenuobj.style.visibility="visible";
dropmenuobj.style.height=sH+"px";
if(stopper_dd[f]==0){
stopper_dd[f]=1;
slideDown(x,.05,.05,-450,f)
}
}
else{
goH[f]=1;
}
}
function slideDown(obj,i,x,or,f){
if(x<1.05){
tot=or-Math.floor((Math.pow(x,1/2)*or))
document.getElementById(obj).style.top=tot+"px"
x+=i;
setTimeout('slideDown("'+obj+'",'+i+','+x+','+or+','+f+')',50)
}
else{
stopper_dd[f]=0;
if(goH[f]==0){
delayH(document.getElementById(obj).parentNode.getAttribute("id"),f)
}
}
}
function slideUp(obj,i,x,or,f){
id=document.getElementById(obj)
if(x<1.05){
tot=Math.floor((Math.pow(x,2)*or))
id.style.top=tot+"px"
x+=i;
x=(Math.round(x*100))/100
setTimeout('slideUp("'+obj+'",'+i+','+x+','+or+','+f+')',50)
}
else{
stopper_dd[f]=0;
id.parentNode.style.visibility="hidden"
id.parentNode.style.height="0px";
opnd[f]=0;
}
}
function delayH(y,f){
setTimeout('ddMH("'+y+'",'+f+')',500)
}
function ddMH(y,f){
if(goH[f]==0){
dropmenuobj=document.getElementById? document.getElementById(y) : y
if(dropmenuobj.childNodes[1]){
var x=dropmenuobj.childNodes[1].getAttribute("id")
}
else{
var x=dropmenuobj.firstChild.getAttribute("id")
}
h=document.getElementById(x).style.top
hs=h.replace(/px/,"")
if(hs==0){
if(stopper_dd[f]==0){
stopper_dd[f]=1;
slideUp(x,.05,.05,-450,f)
}
}
}
}
function goSet(y,f){
goH[f]=1;
}
function goOff(y,f){
goH[f]=0;
delayH(y,f)
}
function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft-3 : what.offsetTop+3;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}
var hoverIMG=new Image;
hoverIMG.src='/images/hover.gif';
function rollOn(x){
x.style.backgroundImage="url(/images/hover.gif)";
}
function rollOut(x){
x.style.backgroundImage="none";
}