
//names of dropdowns stored here
SiA_droplayer=new Array()
SiA_droplayer[0]="drop0"
SiA_droplayer[1]="drop1"
SiA_droplayer[2]="drop2"
SiA_droplayer[3]="drop3"
SiA_droplayer[4]="drop4"
SiA_droplayer[5]="drop5"
SiA_droplayer[6]="drop6"

//simple browser check
SiA_v4=(parseInt(navigator.appVersion)>=4 && parseInt(navigator.appVersion)<=5)?1:0
SiA_ie=(document.all && SiA_v4)?1:0
SiA_ns=(document.layers && SiA_v4)?1:0
SiA_mo=(document.getElementById && SiA_v4 && navigator.userAgent.indexOf('Gecko') != -1)?1:0
SiA_ff=(document.getElementById && SiA_v4 && navigator.userAgent.indexOf('Firefox/3') != -1)?1:0

done = false;

function findPosX(obj) {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
    	}
    else if(obj.x)
        curleft += obj.x;
    return curleft;
}

//code for drops
function SiA_showdrop(thelayer){
	SiA_keep=thelayer; 
	if (SiA_ie)
		SiA_hideall(); 
	SiA_showitnow=1;
	SiA_showit(thelayer)
	}

function SiA_showit(thelayer){
		if(SiA_ie){ 
			eval(SiA_droplayer[thelayer]+'.style.visibility="visible"'); 
			eval('droptop'+[thelayer]+'.style.backgroundColor="#2F6396"');
		}
		if(SiA_ns){ 
			eval('document.'+SiA_droplayer[thelayer]+'.visibility="show"');
			eval('document.droptop'+[thelayer]+'.backgroundColor="#2F6396"');
		}
		if(SiA_ff){
			document.getElementById(SiA_droplayer[thelayer]).style.visibility='visible';
			document.getElementById('droptop'+[thelayer]).style.backgroundColor='#2F6396';
			document.getElementById(SiA_droplayer[thelayer]).style.left = (findPosX(document.getElementById('nav'+[thelayer]))-12)+"px";
		}
		else if(SiA_mo){
			document.getElementById(SiA_droplayer[thelayer]).style.visibility='visible';
			document.getElementById('droptop'+[thelayer]).style.backgroundColor='#2F6396';
		}
	}
	

function SiA_hidedrop(){
		SiA_keep=-1; 
		if (SiA_ie)
			setTimeout('SiA_hideall()',500);
		else
			setTimeout('SiA_hideall()',17);
	}

SiA_keep=-1

function SiA_hideall(){
	for(i=0;i<SiA_droplayer.length;i++){  
		SiA_hideit=0; SiA_checkmousepos(i);
		if(SiA_ie && SiA_keep!=i){ 
			if(SiA_hideit){ 
				eval(SiA_droplayer[i]+'.style.visibility="hidden"');
				eval('droptop'+[i]+'.style.backgroundColor=""');
			} 
		}
		if(SiA_ns && SiA_keep!=i){ 
			if(SiA_hideit){ 
				eval('document.'+SiA_droplayer[i]+'.visibility="hide"'); 
				eval('document.droptop'+[i]+'.backgroundColor=""');
			}
		}
		if(SiA_mo && SiA_keep!=i){
			document.getElementById(SiA_droplayer[i]).style.visibility='hidden';
			document.getElementById('droptop'+i).style.backgroundColor='';
		}
		
	}
}

//deal with cursor over layer
if (SiA_ie) document.onmousemove = SiA_getmousepos;
if (SiA_ns) document.captureEvents(Event.MOUSEMOVE) = SiA_getmousepos(e);
if (SiA_mo) document.onmousemove = SiA_getmousepos;

function SiA_getmousepos(e){
	if(SiA_ns){SiA_mousex=e.pageX; SiA_mousey=e.pageY}
	if(SiA_ie){SiA_mousex=window.event.clientX; SiA_mousey=window.event.clientY;}
	if(SiA_mo){SiA_mousex=e.clientX; SiA_mousey=e.clientY;}
}

function SiA_checkmousepos(i){          
	if(SiA_ns){     
		SiA_x_min=eval('document.'+SiA_droplayer[i]+'.left')
		SiA_x_max=SiA_x_min+eval('document.'+SiA_droplayer[i]+'.clip.width')
		SiA_y_min=eval('document.'+SiA_droplayer[i]+'.top')
		SiA_y_max=SiA_y_min+eval('document.'+SiA_droplayer[i]+'.clip.height')
		}    
	if(SiA_ie){     
		SiA_x_min=eval(SiA_droplayer[i]+'.style.pixelLeft')
		SiA_x_max=SiA_x_min+eval(SiA_droplayer[i]+'.style.pixelWidth')
		SiA_y_min=eval(SiA_droplayer[i]+'.style.pixelTop')
		SiA_y_max=SiA_y_min+eval(SiA_droplayer[i]+'.style.pixelHeight')
		}
	if(SiA_mo){
		SiA_x_min=document.getElementById(SiA_droplayer[i]).offsetLeft;
		SiA_x_max=document.getElementById(SiA_droplayer[i]).offsetWidth + SiA_x_min;
		SiA_y_min=document.getElementById(SiA_droplayer[i]).offsetTop;
		SiA_y_max=document.getElementById(SiA_droplayer[i]).offsetHeight + SiA_y_min;
	}
	
	if (SiA_mousex>=SiA_x_min && SiA_mousex<=SiA_x_max && SiA_mousey>=SiA_y_min && SiA_mousey<=SiA_y_max){
		SiA_hideit=0; 
			if (SiA_ie) setTimeout('SiA_hideall()',500);
		}
	else { SiA_hideit=1 }
	return SiA_hideit
	}

// extra styles for ie5
ie5 = (navigator.userAgent.indexOf('MSIE 5')!=-1)?1:0;
opera=(document.getElementById && SiA_v4 && navigator.userAgent.indexOf('Opera') != -1)?1:0
if(ie5){
	document.write('<style>')
	document.write('#drop0 {top: 0px;}')
	document.write('#drop1 {top: -127px;}')
	document.write('#drop2 {top: -254px;}')
	document.write('#drop3 {top: 0px;}')
	document.write('#drop4 {top: -190px;}')
	document.write('#drop5 {top: -275px;}')
	document.write('#drop6 {top: -367px;}')
	document.write('</style>')
}else{
	document.write('<style media="print" type="text/css">');
	document.write('@import "/interface/css/_global_print.css";');
	document.write('</style>');
}

if(opera){
	document.write('<style media="print">')
	
	document.write('</style>')
}













