/* macromedia jump menu script */

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

/* generic popup window script */

function popupWin(url,name,features)
 {
  window.open(url,name,features);
 }

/* popup window script (centered in page) */

function popupWin2(winurl, winname, winwidth, winheight)
 {
  if (navigator.appVersion.indexOf('4') != -1) 
   {
    // Vars for centering the new window on Version 4 Browsers +
    x4 = screen.width/2 - (winwidth/2);
    y4 = screen.height/2 - (winheight/2);
    newWin = window.open(winurl, winname, 'height='+winheight+',width='+winwidth+',scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,left=' + x4 + ',top=' + y4 + '');
    //delay a bit here because IE4 encounters errors 
    setTimeout('newWin.focus();',250);
   } 
  else 
   {
    newWin = window.open(winurl, winname, 'height='+winheight+',width='+winwidth+',scrollbars=0,resizable=0,menubar=0,toolbar=0,status=0,location=0,directories=0,left=150,top=200');
    //delay a bit here because IE4 encounters errors
    setTimeout('newWin.focus();',250);
   }
 }

/* preload images script */

function preloadImages(dir,arrayName)
 {
  if (document.images)
   {
    for (var i=0; i<eval(arrayName+'.length'); i++)
     {
      arrayItem = eval(arrayName+'[i]');
      eval(arrayItem+' = new Image()');
      eval(arrayItem+'.src = dir+"'+arrayItem+'.gif";');
     }
   }
 }

/* image rollover script */

function rollImg(imgName, state)
 {
  if (document.images)
   {
    if(document[imgName])document[imgName].src= "assets/images/common/preload/" + imgName + state + ".gif";
   }
 }