
// Globus SiteBuilder 1.96.2 generated scripts. Please do not edit.
// compatible with: ie 4.0, 5.1, 6.0; nn 4.7; opera 3.0, 5.0, 6.0

var IE = document.all;
var IEver = '';
var IE4 = 0;
var IE5 = 1;
var OP = 0;
var BodyAlign = "center";
var MenuLPadding = 0;
var MenuRPadding = 0;
var SelectedImage=0;
var TranslitMode = 0;


//----
function BorderOn (id) { id.className='menuitemhover'  }
function SubBorderOn (id) { id.className='submenuitemhover'  }
//----
function BorderOff(id) { id.className='menuitem' }
function SubBorderOff(id) { id.className='submenuitem' }
//----
var occupied_header = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);
var occupied_menu = new Array(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);

//----
	SelectedImage=301;
var MenuItemsCount = 0;
var MenuItemsHPadding = 0;
var aW = new Array(0, 44, 168, 171);
var aSW = new Array(0, 44, 168, 171);


//----
function NN() { return document.layers; }
//----
function Turn(id, mode)
{
  var x;
  var y;
  var windowWidth, subMenuWidth;

  IE = document.all;
  OP = document.getElementById;
  
  if (IE) IE = document.body.filters;

  if(IE)
  {
    y = 0;
    if(!y) y = MAIN.offsetTop + MAINMENU.offsetTop + window.event.srcElement.offsetHeight + window.event.srcElement.offsetTop + window.event.srcElement.offsetParent.offsetTop;
  }
  else if(NN()) y = 30;
  else if (OP) y = 37;

  if(IE)
    windowWidth = document.body.clientWidth;
  else if(OP)
    windowWidth = window.innerWidth;
  else
    windowWidth = window.innerWidth-16;


  if(isRightAligned(id))
  {
    if(BodyAlign=="center") x = (windowWidth-100*windowWidth/100)/2 + 100*windowWidth/100;
    if(BodyAlign=="left") x = 100*windowWidth/100;
    if(BodyAlign=="right") x = windowWidth;
    for(i=MenuItemsCount;i>=id;i--) x -= aSW[i] + ((i==MenuItemsCount) ? 0 : MenuItemsHPadding);


    if(IE)
    {
      if(document.all["dmenu" + id])
        subMenuWidth = document.all["dmenu" + id].clientWidth
    }
    else if(NN())
    {
      if(eval("document.layers['lmenu" + id + "']"))
        subMenuWidth = aSW[id];
    }

    if(BodyAlign=="left" && x + subMenuWidth > 100*windowWidth/100)
      x = 100*windowWidth/100 - subMenuWidth;

    x -= MenuRPadding;
  }
  else
  {
    if(BodyAlign=="center") if (windowWidth > 100*windowWidth/100) x = (windowWidth-100*windowWidth/100)/2; else x = 0;
    if(BodyAlign=="left") x = 0;
    if(BodyAlign=="right") x = windowWidth - 100*windowWidth/100;
    for(i=1;i<id;i++) x += aW[i] + ((i==1) ? 0 : MenuItemsHPadding)
    x += MenuLPadding;
  }

  if(mode)
    eval("setTimeout(\"On(" + id + ", " + mode + ", " + x + ", " + y + ");\",100)");
  else
    eval("setTimeout(\"Off(" + id + ", " + mode + ");\",100)");
}
//----
function On(id, mode, x, y)
{
  if(occupied_header[id])
  {

   if(IE)
   {
     if(!document.all["dmenu" + id]) return;
     eval("dmenu" + id).style.pixelLeft = x;
     eval("dmenu" + id).style.pixelTop = y;
     eval("dmenu" + id).style.display="";

    if(eval("dmenu" + id).filters["revealTrans"])
    {
      eval("dmenu" + id).filters["revealTrans"].apply();
      eval("dmenu" + id).style.visibility = '';
      eval("dmenu" + id).filters["revealTrans"].play();
    }
    if(eval("dmenu" + id).filters["blendTrans"])
    {
      eval("dmenu" + id).filters["blendTrans"].apply();
      eval("dmenu" + id).style.visibility = '';
      eval("dmenu" + id).filters["blendTrans"].play();
    }
    else
      eval("dmenu" + id).style.visibility = '';
   }
   else
   if(NN())
   {
     if(!eval("document.layers['lmenu" + id + "']")) return;
     eval("document.layers['lmenu" + id + "']").visibility = "show";
     eval("document.layers['lmenu" + id + "']").left = x;
     eval("document.layers['lmenu" + id + "']").top = y;
     eval("document.layers['lmenu" + id + "']").display="";
   }
   else if(OP)
   {
     if(!document.getElementById("dmenu" + id)) return;
     document.getElementById("dmenu" + id).style.left=x;
     document.getElementById("dmenu" + id).style.top=y;
     document.getElementById("dmenu" + id).style.visibility='visible';
   }

  }
}
//----
function Off(id, mode)
{
  if(!occupied_menu[id] && !occupied_header[id])
  {
   if(IE)
   {
     if(!document.all["dmenu" + id]) return;
     eval("dmenu" + id).style.display="none";
   }
   else
   if(NN())
   {
     if(!eval("document.layers['lmenu" + id + "']")) return;
     eval("document.layers['lmenu" + id + "']").visibility="hide";
   }
   else if(OP)
   {
     if(!document.getElementById("dmenu" + id)) return;
     document.getElementById("dmenu" + id).style.left=1040;
     document.getElementById("dmenu" + id).style.visibility='hidden';
   }


   if(SelectedImage == id*100) return;
   if(document.images["mi"+id*100])
     document.images["mi"+id*100].src = "mi/mi" + id*100 + ".gif";
  }

}
//----
function isObject(id)
{
  if(IE)
  {
    return document.all[id];
  }
  else
  if(NN())
  {
    return eval("document.layers['" + id + "']");
  }
  else
  if (OP)
  {
    return document.getElementById(id);
  }
}

//----
function isimgact(imageID, act, objectID)
{
  if(objectID==null) objectID = imageID;

  if( (act==0) && (SelectedImage == objectID)) return;

  if( ! document.images["mi"+objectID] ) return;

  if(act==1)
    document.images["mi"+objectID].src = "mi/mi" + imageID + "_.gif";
  else if(act==0  && !isObject("dmenu" + imageID / 100) )
    document.images["mi"+objectID].src = "mi/mi" + imageID + ".gif";
}

function isRightAligned(id)
{
  return (0 );
}

function openVMenu(ID)
{
  if (!IE) return false;
  if(!document.all[ID]) return false;

  var lowsrc;

  if(document.all[ID].style.display == "none")
  {
    document.all[ID].style.display = "";
    if((document.images)&& document.images["vi" + ID])
    {
      lowsrc = document.images["vi" + ID].lowsrc;
      document.images["vi" + ID].lowsrc = document.images["vi" + ID].src;
      document.images["vi" + ID].src = lowsrc;
    }
  }else
  {
    document.all[ID].style.display = "none";
    if((document.images)&& document.images["vi" + ID])
    {
      lowsrc = document.images["vi" + ID].lowsrc;
      document.images["vi" + ID].lowsrc = document.images["vi" + ID].src;
      document.images["vi" + ID].src = lowsrc;
    }
  }
  return false;
}


function activateMenu(id)
{
  occupied_menu[id] = 1;
}

function deactivateMenu(id)
{
  occupied_menu[id] = 0;
}

function activateItem(id)
{
  occupied_header[id] = 1;
}

function deactivateItem(id)
{
  occupied_header[id] = 0;
}

function switchDynamicImage(imageObject)
{
  var imageSrc;
  imageSrc = imageObject.src;
  imageObject.src = imageObject.lowsrc;
  imageObject.lowsrc = imageSrc;
}

submenudata = new Array();





/*************
**** <config>
**/
startColor = "#FFFFFF"; // MouseOut link color
endColor = "#6699CC"; // MouseOver link color
endColor = "#FFD275";

stepIn = 20; // delay when fading in
stepOut = 20; // delay when fading out

/*
** set to true or false; true will
** cause all links to fade automatically
***/
autoFade = false;
/*
** set to true or false; true will cause all CSS
** classes with "fade" in them to fade onmouseover
***/
sloppyClass = true;
/**
**** </config>
**************/
/*************
**** <install>
**
**
**** </install>
**************/

hexa = new makearray(16);
for(var i = 0; i <10; i++)
hexa[i] = i;
hexa[10]="a"; hexa[11]="b"; hexa[12]="c";
hexa[13]="d"; hexa[14]="e"; hexa[15]="f";

document.onmouseover = domouseover;
document.onmouseout = domouseout;

startColor = dehexize(startColor.toLowerCase());
endColor = dehexize(endColor.toLowerCase());

var fadeId = new Array();

function dehexize(Color){
var colorArr = new makearray(3);
for (i=1; i<7; i++){
for (j=0; j<16; j++){
if (Color.charAt(i) == hexa[j]){
if (i%2 !=0)
colorArr[Math.floor((i-1)/2)]=eval(j)*16;
else
colorArr[Math.floor((i-1)/2)]+=eval(j);
}
}
}
return colorArr;
}

function domouseover() {
  if(document.all){
  var srcElement = event.srcElement;
  if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "menuitem" || (sloppyClass && srcElement.className.indexOf("fade") != -1))
  {
    fade(startColor,endColor,srcElement.uniqueID,stepIn);
  } 
//  else
//  if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "submenuitem" || (sloppyClass && srcElement.className.indexOf("fade") != -1))
//  {
//    fade(startColor,endColor,srcElement.uniqueID,stepIn);
//  }
}
}

function domouseout() {
if (document.all){
  var srcElement = event.srcElement;
  if ((srcElement.tagName == "A" && autoFade) || srcElement.className == "menuitem" || (sloppyClass && srcElement.className.indexOf("fade") != -1))
  {
    fade(endColor,startColor,srcElement.uniqueID,stepOut);
  } 
}
}

function makearray(n) {
this.length = n;
for(var i = 1; i <= n; i++)
this[i] = 0;
return this;
}

function hex(i) {
if (i <0)
return "00";
else if (i > 255)
return "ff";
else
return "" + hexa[Math.floor(i/16)] + hexa[i%16];}

function setColor(r, g, b, element) {
var hr = hex(r); var hg = hex(g); var hb = hex(b);
element.style.color = "#"+hr+hg+hb;
}

function fade(s,e, element,step){
var sr = s[0]; var sg = s[1]; var sb = s[2];
var er = e[0]; var eg = e[1]; var eb = e[2];

if (fadeId[0] != null && fade[0] != element){
setColor(sr,sg,sb,eval(fadeId[0]));
var i = 1;
while(i <fadeId.length){
clearTimeout(fadeId[i]);
i++;
}
}

for(var i = 0; i <= step; i++) {
fadeId[i+1] = setTimeout("setColor(Math.floor(" +sr+ " *(( " +step+ " - " +i+ " )/ " +step+ " ) + " +er+ " * (" +i+ "/" +
step+ ")),Math.floor(" +sg+ " * (( " +step+ " - " +i+ " )/ " +step+ " ) + " +eg+ " * (" +i+ "/" +step+
")),Math.floor(" +sb+ " * ((" +step+ "-" +i+ ")/" +step+ ") + " +eb+ " * (" +i+ "/" +step+ ")),"+element+");",i*step);
}
fadeId[0] = element;
}

function order(ProductNo, ProductID, HaveRest, SaleCost, CostInt)
{
  var url = "order.aspx?&product_no="+ProductNo+"&count=1&product_id="+ ProductID + "&sale_cost=" + SaleCost + "&cost_int=" + CostInt + "&have_rest=" + HaveRest +  "&" + Math.random();

  if (IE)
  {
	var sReturnValue = self.showModalDialog(url, "", "status:no;center:yes;help:no;minimize:no;maximize:no;border:thin;statusbar:no;dialogWidth:350px;dialogHeight:350px"); 
                if( sReturnValue != "" && sReturnValue != undefined) document.location.href = sReturnValue;
  }
  else 
  {
	open(url,"","left=" + (windowWidth-350)/2 + ",top=" + (windowHeight-270)/2 +",width=350,height=270,scrollbars=0,resizable=1"); 
  }

 // UpdateBasketStatus();
}


var oldBackgroundColor;

function _over(obj)
{
	oldBackgroundColor = obj.style.backgroundColor;
	obj.style.backgroundColor='beige';
}

function _out(obj)
{
	obj.style.backgroundColor=oldBackgroundColor;
}

