
//*---------------------------------------------------
// Launch KSource Demo
//--------------------------------------------------*/

 function launchDemo2()
   {
		PopUpWindow = window.open("/kshdemo/KSourceDemo.htm", "KSourcePopUp", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=650,height=490");
		PopUpWindow.focus();
   
   }


//*---------------------------------------------------
// GO TO BOOKMARK 
// - must name combo box "cboBookmark", name form "form1"
// - cbo values must be bookmarks
//--------------------------------------------------*/
function gotoBookmark() {
				var sBookmark =document.form1.cboBookmark.options[document.form1.cboBookmark.selectedIndex].value;
				document.form1.cboBookmark.selectedIndex = "#top";
				if (sBookmark != "") location.href=sBookmark;
			}

//*---------------------------------------------------
// GO BACK
//--------------------------------------------------*/

function goback() {
   history.back(1)
}
// -->

//*---------------------------------------------------
// DEMO WINDOW FUNCTION
//--------------------------------------------------*/

function openWin() {
   thepage = eval(args[1]);
   window.open(thepage,"demoWin","width=640,height=480,toolbar=no,location=no,copyhistory=no,resizable=no,alwaysRaised=yes"); 
}

//*---------------------------------------------------
// GUARANTEE FUNCTION
//--------------------------------------------------*/

function satGuar(page) {

window.open(page,"sysreq","width=250,height=250")
}

//*---------------------------------------------------
// SYSTEM REQUIREMENTs FUNCTION
//--------------------------------------------------*/

function newOne(page) {

window.open(page,"sysreq","width=500,height=500")
}

//*---------------------------------------------------
// PRODUCT TOUR FUNCTION
//--------------------------------------------------*/

function productTour(page) {

window.open(page,"producttour","width=750,height=500")
}

//*---------------------------------------------------
// SULA FUNCTION
//--------------------------------------------------*/

function showSULA(page) {

window.open(page,"SULA","width=620,height=520")
}

//*---------------------------------------------------
// PRODUCT TOUR SWF FUNCTION
//--------------------------------------------------*/

function productTourSWF(page) {

window.open(page,"producttour","scrollbars=yes,resizable=yes")
}


//*---------------------------------------------------
// PRODUCT TOUR SWF FUNCTION
//--------------------------------------------------*/

function productTourSWF2(page) {

window.open(page,"producttour","width=800,height=600")
}

//*---------------------------------------------------
// IMAGE ROLLOVER FUNCTION
//--------------------------------------------------*/


function changeImages() {
   if (document.images) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src =  eval(changeImages.arguments[i+1] + ".src");
 	 }
  }
}

//*---------------------------------------------------
// MENU FUNCTIONS
//--------------------------------------------------*/


//*---------------------------------------------------
// Shows the div or layer passed in.
//--------------------------------------------------*/
function showMenu(){
	args = showMenu.arguments;
	if(br=="N"){
		var args, theObj;
		args = showMenu.arguments;
		theObj = eval(args[1]);
  		if (theObj) if(theObj.visibility=='hide'){theObj.visibility = 'show';}
	}
	else if(br=="IE"){
		theObj=eval(args[0]);
		if (theObj) if(theObj.style.visibility=='hidden'){hideElement('select');theObj.style.visibility = 'visible'}
		}
	else{return}
}

//*---------------------------------------------------
// Hides the div or layer passed in.
//--------------------------------------------------*/
function hideMenu(){
	args = hideMenu.arguments;
	if(br=="N"){
		var args, theObj;
		args = hideMenu.arguments;
		theObj = eval(args[1]);
		if (theObj) if(theObj.visibility=='show'){theObj.visibility = 'hide';}
	}
	else if(br=="IE"){
		theObj=eval(args[0]);
		if (theObj) if(theObj.style.visibility=='visible'){showElement('select');theObj.style.visibility = 'hidden'}
		}
	else{return}
}

//*---------------------------------------------------
// Hides active drop down menu that is passed in.
//--------------------------------------------------*/
function hideDiv(){
	args = hideDiv.arguments;
	if(br=="N"){}
	else if(br=="IE"){
		theObj=eval(args[0]);
		// calculate active size of menu
		leftDiv=theObj.offsetLeft +2
		rightDiv=theObj.offsetLeft + theObj.clientWidth -2
		topDiv=theObj.offsetTop +2
		bottomDiv=theObj.offsetTop + theObj.clientHeight -2
		if(window.event.clientY > bottomDiv || 
			window.event.clientY < topDiv || 
			window.event.clientX < leftDiv || 
			window.event.clientX > rightDiv)
			{theObj.style.visibility = 'hidden';showElement('select');}				
		}
	else{return}
}

//*---------------------------------------------------
// IE: Change background color of passed in menu item
// to highlight.
//--------------------------------------------------*/
function divOn(){
	args = divOn.arguments;
	if(br=="N"){}
	else if(br=="IE"){
		theObj=eval(args[0]);
		if(theObj.style.backgroundColor=="#003399"){
			theObj.style.backgroundColor="#3366cc";
		}
	}
	else{return}
}

//*---------------------------------------------------
// IE: Change background color of passed in menu item
// to turn highlight off.
//--------------------------------------------------*/
function divOff(){
	args = divOff.arguments;
	if(br=="N"){}
	else if(br=="IE"){
	theObj=eval(args[0]);
		if(theObj.style.backgroundColor=="#3366cc"){
			theObj.style.backgroundColor="#003399";
		}
	}
	else{return}
}

//*---------------------------------------------------
// NETSCAPE: Change background color of passed in menu item
// to highlight.
//--------------------------------------------------*/
function menuOn(){
	var args, theMenu;
	args = menuOn.arguments;
	theMenu = eval(args[0]);
	theMenu.bgColor="#3366cc" 
}

//*---------------------------------------------------
// NETSCAPE: Change background color of passed in menu 
// item to turn highlight off.
//--------------------------------------------------*/
function menuOff(){
	var args, theMenu;
	args = menuOff.arguments;
	theMenu = eval(args[0]);
	theMenu.bgColor="#003399" 
}

//*---------------------------------------------------
// Go to URL passed in.
//--------------------------------------------------*/
function gotoUrl(){
	args = gotoUrl.arguments;
	location.href=args[0]
}

//*---------------------------------------------------
// Hide the specified HTML element.
//--------------------------------------------------*/
function hideElement(HTMLtag)
{
	for (i = 0; i < document.all.tags(HTMLtag).length; i++)
	{
		obj = document.all.tags(HTMLtag)[i];
		obj.style.visibility = "hidden";
	}
}

//*---------------------------------------------------
// Show the specified HTML element.
//--------------------------------------------------*/
function showElement(HTMLtag)
{
	for (i = 0; i < document.all.tags(HTMLtag).length; i++)
	{
		obj = document.all.tags(HTMLtag)[i];
		obj.style.visibility = "visible";
	}
}

//*---------------------------------------------------
// IE: Build the divs for menu. Pass in
// 'menu name','x in menudata aray',
// 'menu left coord','arrow alignment','top in pixels' 
//--------------------------------------------------*/
var tdID = 0
function doDiv(){
	args = doDiv.arguments;
	var divID = args[0];
	var x = args[1];
	var divLeft = args[2];
	var arrowPos = args[3];
	var divTop = args[4];
	
	objDiv = "<div id=\"" + divID + "\" style=\"position:absolute; left:"+ divLeft +"px; top:"+ divTop +"px; width:130px; z-index:3; background-color:#003399;  visibility:hidden; padding-left:5;\" onMouseover=\"showMenu('document.all[\\'"+ divID +"\\']')\"  onMouseout=\"hideDiv('document.all[\\'" + divID + "\\']')\">"
	objDiv += "<div id=\"arrow\" style=\"position:relative; background-color:#003399; width:120px;\"><img src=/images/top/arrow.gif width=19 height=16 align="+ arrowPos +"></div>"
	
	for (y = 0; y < 20; y++){
	    if(menuData[x][y][0]!=null){
		objDiv += "<div id=\"line\" style=\"position:relative; background-color:#003399; width:120px;\"><img src=/images/top/bar.gif width=120 height=2></div>";
		objDiv += "<div id=\"x" + tdID + "\" style=\"position:relative; background-color:#003399; width:120px;\" onMouseover=\"divOn('document.all[\\'x" + tdID + "\\']')\" onMouseout=\"divOff('document.all[\\'x" + tdID + "\\']')\"><span class=\"nav\" onClick=\"gotoUrl('"+menuData[x][y][1]+"')\">"+ menuData[x][y][0] +"&nbsp;</span></div>"
		tdID = tdID +1
		}
	}
	
	objDiv +="<div id=\"line\" style=\"position:relative; background-color:#003399; width:120px; height:15px;\"><img src=/images/top/bar.gif width=120 height=2></div>"
	//objDiv +="<div id=\"line\" style=\"position:relative; background-color:#003399; width:120px; height:6px\"></div>"
	objDiv +="</div>"
	
	document.write(objDiv);
}

//*---------------------------------------------------
// NETSCAPE: Build layers for menu. Pass in
// 'menu name','x in menudata aray',
// 'menu left coord','arrow alignment','top in pixels' 
//--------------------------------------------------*/
function doLayer(){
	args = doLayer.arguments;
	var nestLayerID=0
	var layerID = args[0];
	var x = args[1];
	var layerLeft = args[2];
	var arrowPos = args[3];
	var layerTop = args[4];

	if(navigator.platform.indexOf("Win") < 0){layerInc=16;layerStyle="netMenuMac";}
	else{layerInc=19;layerStyle="netMenu";}	
		
	objDiv = "<layer id=\""+ layerID +"\" Z-INDEX=1 BGCOLOR=\"#003399\" border:1 solid #3366cc; WIDTH=130 LEFT="+ layerLeft +" TOP="+ layerTop +" VISIBILITY=HIDE onmouseover=\"showMenu('','document.layers[\\'"+ layerID +"\\']')\" onmouseout=\"hideMenu('','document.layers[\\'"+ layerID +"\\']')\">"
	objDiv +="<layer id=\"arrow\" BGCOLOR=\"#003399\" WIDTH=130 HEIGHT=10 Z-INDEX=5 TOP=0><img src=/images/top/arrow.gif width=19 height=16 hspace=3 align="+ arrowPos +"></layer>"
	objDiv +="<layer id=\"line\" BGCOLOR=\"#003399\" WIDTH=130 HEIGHT=2 Z-INDEX=7 TOP=19><center><img src=/images/top/bar.gif width=120 height=2></center></layer>"
	
	var nestTop=21
		for (y = 0; y < 20; y++){
		    if(menuData[x][y][0]!=null){

	objDiv +="<layer id=\"line2\" BGCOLOR=\"#003399\" WIDTH=130 HEIGHT=2 Z-INDEX=7 TOP="+ nestTop +"><center><img src=/images/top/bar.gif width=120 height=2></center></layer>"				
	objDiv += "<layer id=\"x"+nestLayerID+"\" CLIP=\"5,0,125,20\" class=\""+ layerStyle +"\" Z-INDEX=7 BGCOLOR=\"#003399\" HEIGHT=21 WIDTH=130 TOP="+ nestTop +" onmouseover=\"menuOn('document.layers[\\'"+ layerID +"\\'].document.layers[\\'x"+nestLayerID+"\\']')\" onmouseout=\"menuOff('document.layers[\\'"+ layerID +"\\'].document.layers[\\'x"+nestLayerID+"\\']')\"><a id=navstyle  href=javascript:gotoUrl('"+menuData[x][y][1]+"')><font color=#FFFFFF>"+ menuData[x][y][0]
	objDiv +="</font></a></layer>"		

	nestLayerID=nestLayerID+1
	nestTop=nestTop+layerInc
	objDiv +="<layer id=\"line2\" BGCOLOR=\"#003399\" WIDTH=130 HEIGHT=2 Z-INDEX=7 TOP="+ nestTop +"><center><img src=/images/top/bar.gif width=120 height=2></center></layer>"	
	nestTop=nestTop+2
			}
		}
	objDiv +="<layer id=\"lineEnd\" BGCOLOR=\"#003399\" WIDTH=130 HEIGHT=8 Z-INDEX=7 TOP="+ nestTop +"></layer></layer>"
	//objDiv +="<layer id=\"lineEnd\" BGCOLOR=\"#003399\" WIDTH=130 HEIGHT=8 Z-INDEX=7 TOP="+ nestTop +"></layer></layer>"

	document.write(objDiv)
}