<!--
/**
 * (c) Copyright 2001-2002 netdecisions Limited.  This file is the copyright
 * and confidential information of netdecisions Limited or one of its
 * group of companies ("netdecisions") and may not be used in whole or in
 * part without the prior written consent of netdecisions or pursuant to
 * a licence granted by netdecisions allowing such use.
 **/

//global.js - global scripts for presentation mode

if (document.getElementById && document.createTextNode && document.createElement){canDOM=true}

// Major navigation 
function showMenu(n) {
		if(canDOM){
			u=n.getElementsByTagName('div')[0];
			u.style.visibility=u.style.visibility=='visible'?'hidden':'visible';
			}
		}
		
// Search and dropdown onchange function		
function quickFinder(n) {
if(canDOM){
	node=n.parentNode.getElementsByTagName('select')[0];
	location.href = node.value
	}
}

// Show/hide product description (T18 template)
function showDesc(n) {
	if(canDOM){
		node=n.parentNode.parentNode.parentNode.parentNode.getElementsByTagName('div')[1].getElementsByTagName('div');
		a=node[0];
		var num=n.parentNode.id;
		var num_split = num.split("_");
		b=node[num_split[4]];
		a.style.display=a.style.display=='none'?'block':'none';
		b.style.display=b.style.display=='block'?'none':'block';
	}
}	

function nullLink(){
}
function CheckForm() {
	if (document.forms[0].Title.value =="") {
		alert("You must enter a Title!");
		document.forms[0].Title.focus();
		return ( false );
	}
	else if (document.forms[0].Subject.value =="") {
		alert("You must enter a Subject!");
		document.forms[0].Subject.focus();
		return ( false );
	}
	
	else {			
		return ( true );
	}
}


function ChangePassword() {
		aPopUp= window.open('./password_change.cfm' ,"Password", 'width=300,height=250,scrollbars=no,resizeable=No');
}

function EditDongle(pin){
		TempAttributes = 'width=400,height=360,left=20,top=100,resizable=yes,menubar=no,toolbar=no';
		TempString ='dongle_edit.cfm?pin=' + pin;
		aPopUp= window.open(TempString ,"EditDongle", TempAttributes);		
}

function stripCrap(strString) {
	var strChar;
	var newString = "";
	
	if (strString.length == 0) return "";
	for (i = 0; i < strString.length; i++) {
		strChar = strString.charAt(i);
		if (strChar != "%" && strChar != "," && strChar != "$" && strChar != " ") {
			newString = newString + strChar;
		}
	}
	return newString;
}


//-->	

