//<script>
//navigator stuff
var w3c = (document.getElementById) ? 1:0;
var ie = (navigator.appName.indexOf("Microsoft") != -1) ? 1:0;
var ns = (!ie) ? 1:0;
var ie4 = (document.all) ? 1:0;
var ie5 = (navigator.userAgent.indexOf("MSIE 5.0") != -1) ? 1:0;
var ns6 = ((!ie) && (w3c)) ? 1:0;
var ns4 = ((ns) && (!ns6)) ? 1:0;
var mac = (navigator.platform.indexOf("Mac") != -1) ? 1:0;

//div layer stuff
var hide = (ns) ? "hide":"hidden";
var show = (ns) ? "show":"visible";
var visible = new Array(hide,show);

function writeDiv(type)
	{
	if (mac && ie)
		{
		}
	else
		{
		if (type==1)
			{
			document.write('<div id="divContent" class="divContent">');
			} 
		else
			{
			document.write('</div>');
			}
		}
	}

function displayDate()
	{
	//var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
	var months = new Array('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
	var myDays= new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
	var date = new Date();
	var d  = date.getDate();
	var day = (d < 10) ? '0' + d : d;
	var dayname = myDays[date.getDay()];
	var m = date.getMonth() + 1;
	var month = date.getMonth();
	var month = months[month]
	var yy = date.getYear();
	var year = (yy < 1000) ? yy + 1900 : yy;
	var hours = padout(date.getHours());
	var mins = padout(date.getMinutes());
	var partofday;

	daysub="th";
	if (day==1||day==21||day==31) daysub="st";
	if (day==2||day==22) daysub="nd";
	if (day==3) daysub="rd";
	

	document.write("<nobr>" + hours + ':' + mins + "&nbsp;|&nbsp;&nbsp;" + dayname + " " + day + daysub + " " + month + "</nobr>");

	}	
	
function padout(number) 
	{
	return (number < 10) ? '0' + number : number;
	}
	
function getObjectRef(obj) {

	var objref;

	if (w3c) {
		if (document.getElementById(obj)) objref = document.getElementById(obj).style;
	} else if (ie) {
		if (document.all(obj)) objref = document.all(obj).style;
	} else if (ns4) {
		objref = document[obj];
	}

	return objref;

}

var mainTarget;
var frames = false;
function init()
{
  menu = getObjectRef('menuDiv');
  submenu1 = getObjectRef('submenuDiv1');
  
  if (!submenu1) {
	submenu1 = parent.frames['smain'].document.getElementById('submenuDiv1');
	frames = true;
  }
	
  submenu2 = getObjectRef('submenuDiv2');
  submenu3 = getObjectRef('submenuDiv3');
  submenu4 = getObjectRef('submenuDiv4');
  submenu5 = getObjectRef('submenuDiv5');
  submenu6 = getObjectRef('submenuDiv6');
  submenu7 = getObjectRef('submenuDiv7');
  submenu8 = getObjectRef('submenuDiv8');
  submenu9 = getObjectRef('submenuDiv9');
  submenu10 = getObjectRef('submenuDiv10');
  submenu11 = getObjectRef('submenuDiv11');
  submenu12 = getObjectRef('submenuDiv12');
  
  document.onclick = hidemenu;
  
  resizeContent();
  if (!content) return;
  window.onresize = resizeContent;
}

var content;
function resizeContent()
{
  content = getObjectRef('divContent');
  if (!content) return;

  if (ie) {
	var h = document.body.offsetHeight;
	var w = document.body.offsetWidth;
  } else {
	var h = window.innerHeight;
	var w = window.innerWidth;
  }

  content.width = Math.abs(w-308);
  content.height = Math.abs(h-140);
}

function hidemenu(about)
{
  
  if (about)
  {
	if (Xpos>210&&(Ypos>205&&Ypos<220))
	{
	  //alert("Xpos = " + Xpos);
	  return;
	}
  }
  
  if (vis_menu) showmenu(vis_menu,0);
}

var vis_menu = 0;
var menu_count1 = 0;
var menu_count2 = 0;
var timer = 0;
function showmenu(menu_num,state)
{
  
  if (timer==0) timer = setTimeout("hidemenu()",5000);
  menu_count1++;
  if (vis_menu) {
	var temp_menu = vis_menu;
	vis_menu = 0;
	showmenu(temp_menu,0);
	menu_count2++;
  }
   
  if (ie) {
	if (state==0) {
	  //if (frames) submenu1.style.visibility = show;
	  //eval("submenu"+menu_num+".visibility = show;");
	}
	//submenu1.filters.blendTrans.apply();
  }
  if (frames)
  {
	submenu1.style.visibility = visible[state];
  } else
  {
//	eval("submenu1.visibility = '" + visible[state] + "';");  
  if (ie) {
	if (state==0) eval("submenu"+menu_num+".visibility = show;");
	eval("submenuDiv"+menu_num+".filters.blendTrans.apply();");
  }
  eval("submenu"+menu_num+".visibility = '" + visible[state] + "';");
  if (ie) eval("submenuDiv"+menu_num+".filters.blendTrans.play();");
}    
  if (state) {
		selectBoxes(visible[0]);
		vis_menu = menu_num;
  } else {
		selectBoxes(visible[1]);
	}
  
  return;
}

function selectBoxes(vis)
{
	
	var sb = getObjectRef('selectArea');
	if (!sb) return;
	sb.visibility = vis;

}
	
if (document.images)
{
// Arrow On
arrow1_on  = new Image(); arrow1_on.src = "../images/arrow_on.gif"
arrow2_on  = new Image(); arrow2_on.src = "../images/arrow_on.gif"
arrow3_on  = new Image(); arrow3_on.src = "../images/arrow_on.gif"
arrow4_on  = new Image(); arrow4_on.src = "../images/arrow_on.gif"
arrow5_on  = new Image(); arrow5_on.src = "../images/arrow_on.gif"
arrow6_on  = new Image(); arrow6_on.src = "../images/arrow_on.gif"
arrow7_on  = new Image(); arrow7_on.src = "../images/arrow_on.gif"
arrow8_on  = new Image(); arrow8_on.src = "../images/arrow_on.gif"
arrow9_on  = new Image(); arrow9_on.src = "../images/arrow_on.gif"
arrow10_on  = new Image(); arrow10_on.src = "../images/arrow_on.gif"
arrow11_on  = new Image(); arrow11_on.src = "../images/arrow_on.gif"
arrow12_on  = new Image(); arrow12_on.src = "../images/arrow_on.gif"
arrow13_on  = new Image(); arrow13_on.src = "../images/arrow_on.gif"
arrow14_on  = new Image(); arrow14_on.src = "../images/arrow_on.gif"
arrow15_on  = new Image(); arrow15_on.src = "../images/arrow_on.gif"
arrow16_on  = new Image(); arrow16_on.src = "../images/arrow_on.gif"
arrow17_on  = new Image(); arrow17_on.src = "../images/arrow_on.gif"
arrow18_on  = new Image(); arrow18_on.src = "../images/arrow_on.gif"
arrow19_on  = new Image(); arrow19_on.src = "../images/arrow_off.gif"
arrow20_on  = new Image(); arrow20_on.src = "../images/arrow_on.gif"
// Arrow Off
arrow1_off = new Image(); arrow1_off.src = "../images/arrow_off.gif"
arrow2_off = new Image(); arrow2_off.src = "../images/arrow_off.gif"
arrow3_off = new Image(); arrow3_off.src = "../images/arrow_off.gif"
arrow4_off = new Image(); arrow4_off.src = "../images/arrow_off.gif"
arrow5_off = new Image(); arrow5_off.src = "../images/arrow_off.gif"
arrow6_off = new Image(); arrow6_off.src = "../images/arrow_off.gif"
arrow7_off = new Image(); arrow7_off.src = "../images/arrow_off.gif"
arrow8_off = new Image(); arrow8_off.src = "../images/arrow_off.gif"
arrow9_off = new Image(); arrow9_off.src = "../images/arrow_off.gif"
arrow10_off = new Image(); arrow10_off.src = "../images/arrow_off.gif"
arrow11_off = new Image(); arrow11_off.src = "../images/arrow_off.gif"
arrow12_off = new Image(); arrow12_off.src = "../images/arrow_off.gif"
arrow13_off = new Image(); arrow13_off.src = "../images/arrow_off.gif"
arrow14_off = new Image(); arrow14_off.src = "../images/arrow_off.gif"
arrow15_off = new Image(); arrow15_off.src = "../images/arrow_off.gif"
arrow16_off = new Image(); arrow16_off.src = "../images/arrow_off.gif"
arrow17_off = new Image(); arrow17_off.src = "../images/arrow_off.gif"
arrow18_off = new Image(); arrow18_off.src = "../images/arrow_off.gif"
arrow19_off = new Image(); arrow19_off.src = "../images/arrow_on.gif"
arrow20_off = new Image(); arrow20_off.src = "../images/arrow_off.gif"

function imgOn(imgName)
{
	if (document.images)
	{
		document.images[imgName].src = eval(imgName + "_on.src");
	}
}

function imgOff(imgName)
{
	if (document.images)
	{
		document.images[imgName].src = eval(imgName + "_off.src");
	}
}

function arrows(elm,mode)
{
	var item;
	if(document.getElementById)
	{
		item = document.getElementById(elm);
		if(mode)
			item.style.color = "#06FF00";
		else
			item.style.color = "";
		}
	}
	
function nav(elm,mode)
{
	var item;
	if(document.getElementById)
	{
		item = document.getElementById(elm);
		if(mode)
			item.style.color = "#A1A1A1";
		else
			item.style.color = "";
		}
	}
	
function subtext_color(elm,mode)
{

var item;

if (mainTarget)
{
//  if(!mode)
//  {
//	alert(parseInt(mainTarget));
//	alert(parseInt(document.getElementById(elm).id.substring(14,15)));
	//if (document.getElementById(elm)) {
	  if ((parseInt(mainTarget)==parseInt(document.getElementById(elm).id.substring(14,15)))) return;
	//}
//  }
}

	if(document.getElementById)
	{
		item = document.getElementById(elm);
		if(mode)
			item.style.color = "#FFFFFF";
		else
			item.style.color = "";
		}
	}
}


var timer2 = 0;
function submenu_color(elm,mode)
{
	var item;
	if(document.getElementById)
	{
		item = document.getElementById(elm);
		if(mode)
		{
			item.style.backgroundColor = "#484848";
			clearTimeout(timer2);
			subroll(1);
		}
		else
		{
			item.style.backgroundColor = "";
			timer2 = setTimeout("subroll(0);",100);
		}
	}
}

function subroll(n)
{
  if (n) {
	clearTimeout(timer);
	timer = setTimeout("hidemenu()",5000);
  } else {
	hidemenu();
  }
}

var divset;

var sw = Number;
var sh = Number;

var posdata;

var storeX1;
var storeX2;
var storeY1;
var storeY2;

var Xpos;
var Ypos;

var isNetscape = (document.layers) ? 1:0

function MoveHandler(e) {
Xpos = e.pageX;
Ypos = e.pageY;
position()
return true;
}

function MoveHandlerIE() {
Xpos = window.event.x + document.body.scrollLeft;
Ypos = window.event.y + document.body.scrollTop;
position()
}

function DownHandlerIE() {
	storeX1 = Xpos;
	storeY1 = Ypos;
	position()
}

if (isNetscape) {

document.captureEvents(Event.MOUSEMOVE);
document.onMouseMove = MoveHandler;
} else {
document.onmousemove = MoveHandlerIE;
document.onmousedown = DownHandlerIE;
}

function position() {

	//window.status = "Absolute Pos: (" + Xpos + "," + Ypos + ")";
	
	if (divset) {
		sw = Xpos-storeX1;
		sh = Ypos-storeY1;
	}

}

//</script>