document.write('<style type="text/css">TR.subdiv{display:none;}</style>');

var img1=new Image(); img1.src='../img/tab_end_o.gif';

function Agent(){
  this.agent=navigator.userAgent.toLowerCase();
  this.opera = (this.agent.indexOf('opera')!=-1) ? true:false;
  this.ie = (this.agent.indexOf('msie')>=0) ? true:false;
  this.ns6 = ((this.agent.indexOf('gecko')>=0) && (this.agent.indexOf('opera')==-1)) ? true:false;
  this.ns4 = ((this.agent.indexOf('mozilla')>=0) && (this.agent.indexOf('gecko')==-1) && (this.agent.indexOf('msie')==-1)) ? true:false;
  return(1);
}
var is = new Agent();

function SwapImage(id,mode){
  var img = document.images[id].src;
  if(mode==3) document.images[id].src=img.substr(0,img.length-6)+'_a.'+img.substr(img.length-3,img.length);  
  if(mode==2) document.images[id].src=img.substr(0,img.length-6)+'_o.'+img.substr(img.length-3,img.length);
  if(mode==1) document.images[id].src=img.substr(0,img.length-4)+'_o.'+img.substr(img.length-3,img.length);
  if(mode==0) document.images[id].src=img.substr(0,img.length-6)+'.'+img.substr(img.length-3,img.length);  
}


function OpenImg(src, width, height, target, scrollbars)
{
 format=src.substr(src.length-3,src.length);
 win=window.open('',target,'screenX='+(screen.availWidth-width)/2+', screenY='+(screen.availHeight-height)/2+', width='+width+',height='+height+',hotkeys=1,resizable=yes,scrollbars='+scrollbars);
 win.document.write('<html><head></head><body marginwidth=0 marginheight=0 style="margin:0 0 0 0; padding:0 0 0 0;">');
 if(format!="swf") win.document.write('<IMG src="'+src+'" alt="" width="'+width+'" height="'+height+'">');
 else win.document.write('<OBJECT  classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" HEIGHT="'+height+'" WIDTH="'+width+'"><PARAM NAME=movie VALUE="'+src+'"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE="#FFFFFF"><EMBED  src="'+src+'" quality=high  HEIGHT="'+height+'" WIDTH="'+width+'"    TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>');
 win.document.write("</body></html>");
 win.focus();
 win.document.close();
}

function show_popup(src,width,height,title){
	win=window.open(src,'','screenX='+Math.floor((screen.availWidth-width)/2)+', screenY='+Math.floor((screen.availHeight-height)/2)+', left='+Math.floor((screen.availWidth-width)/2)+', top='+Math.floor((screen.availHeight-height)/2)+', width='+(width)+',height='+(height)+',hotkeys=1,resizable=yes,scrollbars=no');
	win.focus();
}

function opendiv(id){
	var display='none';
	with(document.getElementById("subdiv"+id)){
		if(style.display=='none' || style.display=='') 
			display=(is.ie)?'block':'table-row';
		style.display=display;
	}
}

function select(obj,over){
	var cl=obj.className;
	switch (over){
	case 1:
		cl+="-hover";
		break;
	case 0:
		cl=cl.substr(0,cl.lastIndexOf("-hover"));
		break;
	}
	obj.className=cl;
}
