
/* Browser Compatibility */
	
	/*isNS6 = document.getElementById ? true:false;
	isNS4 = document.layers ? true:false;
	isIE4 = document.all ? true:false;
	isIE5 = document.getElementById ? true:false;*/
	
	isNS4 = (document.layers) ? true : false;
	isIE4 = (document.all && !document.getElementById) ? true : false;
	isIE5 = (document.all && document.getElementById) ? true : false;
	isNS6 = (!document.all && document.getElementById) ? true : false;

	if (isNS4){
		document.write('<LINK REL="STYLESHEET" TYPE="text/css" HREF="nav/position_n.css">'); 
	}
	else if (isIE4 || isIE5 || isNS6) {
		document.write('<LINK REL="STYLESHEET" TYPE="text/css" HREF="nav/position_ie.css">');
	}
	
	
	function display_ctrl(i) 
	{
		if (isNS4){
			/*if (i == 1) 
				document.hidecontrol.visibility = "hide";
			else
				document.hidecontrol.visibility = "show";*/
		}
		else if (isIE4) {
			if (i == 1)
				document.all["hidecontrol"].style.visibility = "hidden";
			else	
				document.all["hidecontrol"].style.visibility = "visible";
		}
		else if (isIE5 || isNS6) {
			if (i == 1)
				document.getElementById("hidecontrol").style.visibility = "hidden";
			else	
				document.getElementById("hidecontrol").style.visibility = "visible";
		}
	}

	var Console=0;
	function popup(mapopup,name,width,height)
	{
			if(Console==0)
	        		Console = window.open(mapopup,name,width+","+height+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0");
			Console.focus();
			Console=0;
	}
	function popup_scroll(mapopup,name,width,height)
	{
			if(Console==0)
	        		Console = window.open(mapopup,name,width+","+height+",toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0");
			Console.focus();
			Console=0;
	}
	function build_url()
	{
		my_url = "/search_engine/search.cfm?keywords=" + document.search.keywords.value;
   		popup_scroll(my_url, 'result', 'width=700', 'height=450');
	}

	
	//The speed of the timeout between each scroll.
	timSpeed = 50

	function makeScrollObj(obj, nest)
	{									
		if (isNS4){
			nest = ( !nest ) ? '' : 'document.' + nest + '.'	
			this.css = eval(nest + 'document.' + obj)					
			this.scrollHeight = this.css.document.height
		}
		else if (isIE4) {
			this.css = eval('document.all.' + obj + '.style')					
			this.scrollHeight = eval('document.all.' + obj + '.offsetHeight')
		}
		else if (isIE5 || isNS6) {
			this.css = eval('document.getElementById("' + obj + '").style')					
			this.scrollHeight = eval('document.getElementById("' + obj + '").offsetHeight')

		}
		this.top = b_gettop				
		return this
	}
	
	function b_gettop()
	{
		if (isNS4){
			var gleft = eval(this.css.top);
		}
		else if (isIE4) {
			var gleft = eval(this.css.pixelTop);
		}
		else if (isIE5) {
			var gleft = eval(this.css.pixelTop);
		}
		else if (isNS6) {
			var gleft = eval(this.css.top); 
		}
		return gleft;
	}
	//Variables
	var scrollTim;
	var active=0;
	
	function scroll(speed)
	{
		clearTimeout(scrollTim)
		way = speed > 0 ? 1 : 0;
		if (isNS4 || isNS6){
			var win_height = window.innerHeight - 155;
		}
		else if (isIE4 || isIE5) {
			var win_height = document.body.clientHeight - 155;
		}
		
		if(isNS6){
			
			temp = parseInt(document.getElementById("divScroll1").style.top);
			if(!temp){
				temp = 0;
			}
		} else {
			temp = oScroll[active].top();
		}
		if (( !way && temp > -oScroll[active].scrollHeight + win_height) || (temp < 0 && way)) {
			if(isNS6){
				document.getElementById("divScroll1").style.top = temp + speed;
			} else {
				oScroll[active].css.top = temp + speed;
			}
			scrollTim = setTimeout("scroll(" + speed + ")", timSpeed);
		}
	}
	
	
	function noScroll()
	{
		clearTimeout(scrollTim)
	}
	
	function scrollInit()
	{
		oScroll = new Array()
		oScroll[0] = new makeScrollObj("divScroll1", "divCont");
		oScroll[0].css.visibility = "visible";
	}
	
	onload = scrollInit;




/* Change Links Images - Display Link On Hover */

function img_act(imgName)
	{
	if (document.images)
		document[imgName].src = eval(imgName + 'on.src')
		}

	function img_inact(imgName)
		{
		if (document.images)
			document[imgName].src = eval(imgName + 'off.src')	
	}

/* Breadcrumbs - Display link on hover */

function imgOn( imgName ) 
{
if (document.images)
   {
    nam=""     		
    for (i=0;i<(imgName.length-1);i++) 
    nam+=imgName.charAt(i)
    if (nam=="pos")
    { 
     n=parseInt(imgName.charAt(3))
     for (i=n;i<=anz;i++)
         {
          nam="arrow"+i
          document[nam].src =  arrow1On.src
         }
     }
      document[imgName].src = eval( imgName + "On.src" )
    }
}

function imgOff( imgName ) 
{
 if (document.images)
    {
     nam=""     		
     for (i=0;i<(imgName.length-1);i++) 
     nam+=imgName.charAt(i)
     if (nam=="pos")
        { 
   	 n=parseInt(imgName.charAt(3))
 	 for (i=n;i<=anz;i++)
             {
	      nam="arrow"+i
	      document[nam].src =  arrow1Off.src
             }
	 }
 	 document[imgName].src = eval( imgName + "Off.src" )
    }
}

/* Disable right mouse click */

var message="© Mywip 2009. All worldwide rights reserved";
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;

