// JavaScript Utilities Document for Passport Model Management created 09/02/24

// Image pre-loader
var pImg=new Array()
function preloadimages()
{
	for (i=0;i<preloadimages.arguments.length;i++)
	{
		pImg[i]=new Image()
		pImg[i].src=preloadimages.arguments[i]
	}
}
preloadimages("images/Passport.jpg","images/btn_women.gif","images/btn_women2.gif","images/btn_men.gif","btn_men2.gif","images/btn_plus.gif","images/btn_plus2.gif","images/btn_creative.gif","images/btn_creative2.gif","images/btn_creative_plus_mover2.gif","images/btn_creative_plus_mover.gif","images/btn_home.gif","images/btn_home2.gif","images/btn_contact.gif","images/btn_contact2.gif","images/btn_about.gif","images/btn_about2.gif","images/btn_favorites.gif","images/btn_favorites2.gif","images/btn_be_discovered.gif","images/btn_be_discovered2.gif","images/btn_next.gif","images/btn_next2.gif","images/btn_prev.gif","images/btn_prev2.gif","images/btn_remove.gif","images/btn_remove2.gif","images/btn_find_a_model.gif","images/btn_find_a_model2.gif","images/btn_requestInfo.gif","btn_requestInfo2.gif","images/btn_submit.gif","images/btn_submit2.gif")

// Image swap
function roll(img_name1, img_src1)
   {
   
   document[img_name1].src = img_src1;
   
   }
   
//Show/Hide Layers

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


// pop-up window for request_info.aspx
function reqInfo() {
 
   myWin= open("request_info.aspx", "largeWindow",
    "width=670,height=320,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,target='largeWindow'");	

   //this is the line that does the focusing on the "pop-up" window	
   setTimeout('myWin.focus();',250);	

	 }