// JavaScript Utilities for Tess Management

// 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/logo.png","images/tess_logo.gif","images/btn_talent.png","images/btn_talent2.png","images/btn_news.png","images/btn_news2.png","images/btn_contact.png","images/btn_contact2.png","images/btn_about.png","images/btn_about2.png","images/btn_become.png","images/btn_become2.png","images/frame_bg2.png","images/frame_bg_news.png","images/polaroid-img-bg.gif","images/btn_dll2.gif","images/btn_portfolio.png","images/btn_portfolio2.png","images/btn_print.png","images/btn_print2.png","images/btn_back.png","images/btn_back2.png","images/btn_videos.png","images/btn_videos2.png","images/btn_polaroids.png","images/btn_polaroids2.png","images/btn_campaigns.png","images/btn_campaigns2.png","images/btn_biography.png","images/btn_biography2.png")


//Image rollover
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;
}

//terms and conditions
function terms1() {
 
	myWin= open("terms.htm", "largeWindow",
	"width=520,height=515,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,target='largeWindow'");	
	
	//this is the line that does the focusing on the "pop-up" window	
	setTimeout('myWin.focus();',250);	

}

//website terms and conditions
function termsUse() {
 
	myWin= open("terms-of-use.htm", "largeWindow",
	"width=520,height=515,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,target='largeWindow'");	
	
	//this is the line that does the focusing on the "pop-up" window	
	setTimeout('myWin.focus();',250);	

}

//privacy
function privacy1() {
 
	myWin= open("privacy.htm", "largeWindow",
	"width=520,height=515,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=no,target='largeWindow'");	
	
	//this is the line that does the focusing on the "pop-up" window	
	setTimeout('myWin.focus();',250);	

}
