

display = {}



display.els = [];

display.active = 0;

display.sz = [];

display.sz['landscape'] = [557,398];

display.sz['portrait'] = [286,398];

display.movie = false;

display.sub = "";



display.init = function(){

	this.la_main = get_layer("display0");

	this.la_pop = get_layer("dispPop");

	this.la_pop2 = (bw=="ns") ? get_layer("dispPop2Ot") : get_layer("dispPop2");

	this.la_mov = get_layer("dispMovOn");

	this.la_award_hide = get_layer("dispAwHd");
	
	this.la_copy_hide = get_layer("dispCpHd");

}



display.show = function(ip_nw){

	if (typeof(ip_nw)!="undefined"){

		this.vs("main");

		if (bw!="ns") get_layer("display_nm_"+this.active).className = "txt3";

		this.active = ip_nw;	

	}

	

	if (!this.els[this.active][6]) this.els[this.active][6]="landscape";

	if (bw!="ns") get_layer("display_nm_"+this.active).className = "txt2";

	this.la_award_hide.style.visibility = (this.els[this.active][4]=="") ? "visible" : "hidden";
	this.la_copy_hide.style.visibility = (this.els[this.active][3]=="") ? "visible" : "hidden";



	

	var url = this.els[this.active][0];

	if (url=="copy"){

		var str=this.els[this.active][1];	

	} else {

		var str0 = "<img width='"+this.sz[this.els[this.active][6]][0]+"' height='"+this.sz[this.els[this.active][6]][1]+"' src='"+url+"'>";

		var str1 = "<div align='center'><br><embed width='354' height='320' src='"+url+"' type='application/x-shockwave-flash'></embed></div>";

		var str2 = "<table width='520' cellpadding='0' cellspacing='0' border='0'><tr><td class='txt1' width='520'>Sorry, you need a Macromedia Flash 6 Plugin for your browser to view this content. Please download it from <a href='http://www.macromedia.com/downloads/' target='_blank' class='txt3'>http://www.macromedia.com/downloads/</a>.</td></tr></table>";

		this.movie = (url.indexOf(".swf")!=-1);

		if (!this.movie) str = str0;

		if (this.movie){

			str = (flash) ? str1 : str2;

		}

	}

	this.la_main.LA_write(str);

}



display.mv_on = function(ip_dr){

	if (ip_dr=="f" && this.active==(this.els.length-1)){

		if (typeof(this.next_url)!="undefined" && this.next_url!=""){

			document.location.href=this.next_url;

		}

		return;

	}

	if (ip_dr=="b" && this.active==0) return;

	var nw = display.active

	if (ip_dr=="b") nw--; else nw++; 

	this.show(nw);

}



display.st = function(ip_ind){

	if (ip_ind==this.active) return;

	this.show(ip_ind);	

}



display.popup = function(ip_type){

	str_ar = this.draw_box(ip_type);

	this.la_pop.LA_write(str_ar[0]);

	this.la_pop2.LA_write(str_ar[1]);	

	if (!window.scr){

		scr = new content_scroll("scr","dispPop2Ot","dispPop2",false,350,295);

		if (bw=="ie" && mc) kill_highlight();

	} else {

		scr.show();

	}

	this.vs(ip_type);

}



display.draw_box = function(ip_type){



	var stra="			<img src='IMG_SRC' width='THUMB_WIDTH'><table border='0' cellspacing='0' cellpadding='0'><br>";

	stra+="				<tr valign='top'>";

	stra+="					<td width='14'><img src='imgs/icon_bullet3.gif' width='4' height='8' vspace='2' name='disp_bk'></td>";

	stra+="					<td width='26'><a href='#' onClick='display.close(0);' class='txt3' onMouseOver=\"img_swap('disp_bk','imgs/icon_bullet3_on.gif');\" onMouseOut=\"img_swap('disp_bk');\">back</a></td>";

	stra+="				</tr>";

	stra+="			</table><br><br><br>AWARD";



	var strb="			<table width='266' border='0' cellspacing='0' cellpadding='0'>";

	strb+="				<tr>";

	strb+="					<td valign='top' class='txt1'>CONTENT</td>";

	strb+="				</tr>";

	strb+="			</table>";

	

	var str1="",str2;

	if (ip_type=="background") str2 = this.els[this.active][2];

	if (ip_type=="copy") str2 = this.els[this.active][3];

	if (ip_type=="award"){

		str1 = this.els[this.active][5]

		str2 = this.els[this.active][4];

	}

	var thb_wd = (this.els[this.active][6]=="landscape") ? 220 : 150;

	strb = strb.replace("CONTENT",str2);

	stra = stra.replace("THUMB_WIDTH",thb_wd);	

	stra = stra.replace("IMG_SRC",this.els[this.active][1]);

	stra = stra.replace("AWARD",str1);



	return [stra,strb];

}



display.close= function(){

	this.vs("main");

}



display.vs = function(ip_nm){

	this.la_main.style.visibility = (ip_nm=="main") ? "visible" : "hidden";

	this.la_pop.style.visibility = (ip_nm!="main") ? "visible" : "hidden";

	this.la_pop2.style.visibility = (ip_nm!="main") ? "visible" : "hidden";

	

	var bk_st,cp_st,aw_st;

	if (ip_nm!="background") img_swap("icon_disp_background","imgs/icon_bullet1.gif");		

	if (ip_nm!="copy") img_swap("icon_disp_copy","imgs/icon_bullet1.gif");

	if (ip_nm!="award") img_swap("icon_disp_award","imgs/icon_bullet1.gif");

	if (ip_nm=="main"){

		if (window.scr){

			scr.la2.LA_write("");

			scr.show();

		}

		bk_st = cp_st = aw_st = "txt3";

		this.sub = "";

	} else {

		this.sub = ip_nm;

	}

	

	if (ip_nm=="background"){

		bk_st = "txt2";

		cp_st = aw_st = "txt3";

	}

	

	if (ip_nm=="copy"){

		cp_st = "txt2";

		bk_st = aw_st = "txt3";

	}

	

	if (ip_nm=="award"){

		aw_st = "txt2";

		bk_st = cp_st = "txt3";

	}	

	

	if (bw!="ns"){

		get_layer("display_background").className = bk_st;

		get_layer("display_copy").className = cp_st;

		get_layer("display_award").className = aw_st;

	}

}



display.menu_on = function(){

	if (this.movie && this.sub==""){

		this.la_main.style.visibility = "hidden";

		this.la_mov.style.visibility = "visible";

	}

}



display.menu_off = function(){

	if (this.movie && this.sub==""){

		this.la_main.style.visibility = "visible";

		this.la_mov.style.visibility = "hidden";

	}

}



display.mv = function(ip_nm){

 	if (this.sub!=ip_nm){

		img_swap("icon_disp_"+ip_nm,"imgs/icon_bullet1_on.gif");	

	}

}



display.mt = function(ip_nm){

 	if (this.sub!=ip_nm){

		img_swap("icon_disp_"+ip_nm,"imgs/icon_bullet1.gif");	

	}

}