//Centring functions
var IE5 = NN6 = false

if( document.all )IE5 = true
else if( document.getElementById )NN6 = true

function initialize() {
   myObj=document.getElementById("adacosmetic1").style
   rePos()
   myObj.visibility = 'visible'
}

var h=540;  
var w=780;

function rePos() {
   // compute center coordinate
   if(IE5) { 
      yc = Math.round((document.body.clientHeight/2)-(h/2))
    xc = Math.round((document.body.clientWidth/2)-(w/2))
  }

   else if(NN6) {
      yc = Math.round((window.innerHeight/2)-(h/2))
   xc = Math.round((window.innerWidth/2)-(w/2))
  }

 if( xc < 0 )
    xc = 0;
 
   if( yc < 0 )
      yc = 0;

   // reposition div
   myObj.top = yc + "px"
   myObj.left = xc + "px"
}

// rollovers
function newImage(arg) {
  if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}

function changeImages() {
  if (document.images && (preloadFlag == true)) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
  }
}

var preloadFlag = false;
function preloadImages() {
  if (document.images) {
   
    preloadFlag = true;
  }
}
