// convert all characters to lowercase to simplify testing
var agt=navigator.userAgent.toLowerCase();
// *** BROWSER VERSION ***
// Note: On IE5, these return 4, so use is_ie5up to detect IE5.
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
// Note: Opera and WebTV spoof Navigator.  We do strict client detection.
// If you want to allow spoofing, take out the tests for opera and webtv.
    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);

    // *** PLATFORM ***
    var is_win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
    var is_mac    = (agt.indexOf("mac")!=-1);
	
	function EditPageOnLoad() {
	// if ( document.forms.length == 0 ) return;
	// formfields.Add(new validatedfield(form1.FirstName, 's', 'First Name', true));
							  }

var a = Math.random(); 
var zzzzadslotzzzz= a * 100000;

function goto_URL(object) {window.open(object.options[object.selectedIndex].value,'windowName');}

function soda(url,name,w,h) {at='scrollbars=no,resizable=yes,width='+w+',height='+h; pt=window.open(url,name,at)}

var mnuSelected = '';var linkSelected = '';var myCancel;var status;
	function showMenu(num, difference) {
		var menu = "menu" + num; var linkID = "link" + num;
		hideMenu(mnuSelected, linkSelected);
		obj = document.getElementById(linkID)
		obj.style.color = '#fff';		
		oLeft = findPosX(obj);
		oTop = findPosY(obj);
		move (oTop, oLeft, menu, difference);
		document.getElementById(menu).style.visibility = 'visible';
		mnuSelected = menu;
		linkSelected = linkID;
   	}
   	
	function hideMenu(menu, linkID) {
   		if (mnuSelected != '') {
      		document.getElementById(menu).style.visibility = 'hidden';
			document.getElementById(linkID).style.color = '#f5f5f5';
		}
   	}
	
	function move(top, left, id, diff) {	
		top = top - 113;
		left = left + 0;
		document.getElementById(id).style.top = top + "px";		
		document.getElementById(id).style.left = left + "px";	
	}
	
	function findPosX(obj) {var curleft = 0;
		if (obj.offsetParent) {
			while (obj.offsetParent)
			{  curleft += obj.offsetLeft
				obj = obj.offsetParent;
			}
		}
		return curleft;
	}
	function findPosY(obj) {
		var curtop = 0;
		if (obj.offsetParent)
		{	while (obj.offsetParent)
			{ curtop += obj.offsetTop
			  obj = obj.offsetParent;
			}
		}
		return curtop;
	}
document.onclick = clickHandle;
function clickHandle() {hideMenu(mnuSelected, linkSelected);}

