// define mouseover for main menu
if (document.images) {
  menu1on = new Image();
  menu1on.src = "/english/images/cover/menu_01on.gif";

  menu2on = new Image();
  menu2on.src = "/english/images/cover/menu_02on.gif";

  menu3on = new Image();
  menu3on.src = "/english/images/cover/menu_03on.gif";

  menu4on = new Image();
  menu4on.src = "/english/images/cover/menu_04on.gif";

  menu5on = new Image();
  menu5on.src = "/english/images/cover/menu_05on.gif";
  
  menu6on = new Image();
  menu6on.src = "/english/images/cover/menu_06on.gif";

  menu1off = new Image();
  menu1off.src = "/english/images/cover/menu_01off.gif";

  menu2off = new Image();
  menu2off.src = "/english/images/cover/menu_02off.gif";

  menu3off = new Image();
  menu3off.src = "/english/images/cover/menu_03off.gif";

  menu4off = new Image();
  menu4off.src = "/english/images/cover/menu_04off.gif";

  menu5off = new Image();
  menu5off.src = "/english/images/cover/menu_05off.gif";
  
  menu6off = new Image();
  menu6off.src = "/english/images/cover/menu_06off.gif";
  
}

function changeImages() {
  if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
    }
  }
}

// Switch Language

function Switch(Target)
{

 // Target True then From English to Arabic

 var strTemp,strTempNew;
 
 strTemp=document.location.href;

 if(Target)
	strTempNew=strTemp.replace("english","arabic");
 else
	strTempNew=strTemp.replace("arabic","english");
   
 if(strTemp.indexOf("/english/")==-1)
	 if(Target)
		strTempNew=strTemp.replace("default","/arabic/default");
		
 document.location.href=strTempNew;
}


// Portfolio Pop-ups
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);}


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);