
// broadband what you need page - image toggle
/*
Highlight menu effect script: By Dynamicdrive.com
For full source, Terms of service, and 100s DTHML scripts
Visit http://www.dynamicdrive.com
*/

function borderize(what,color){
what.style.borderColor=color
}

function borderize_on(e){
if (document.all)
source3=event.srcElement
else if (document.getElementById)
source3=e.target
if (source3.className=="menulines"){
borderize(source3,"black")
}
else{
while(source3.tagName!="TABLE"){
source3=document.getElementById? source3.parentNode : source3.parentElement
if (source3.className=="menulines")
borderize(source3,"black")
}
}
}

function borderize_off(e){
if (document.all)
source4=event.srcElement
else if (document.getElementById)
source4=e.target
if (source4.className=="menulines")
borderize(source4,"white")
else{
while(source4.tagName!="TABLE"){
source4=document.getElementById? source4.parentNode : source4.parentElement
if (source4.className=="menulines")
borderize(source4,"white")
}
}
}


function toggleWireless()
		{
			var obj;
			obj = document.getElementById("wirelessSetup");
			obj.style.display = 'block';
			
			var obj;
			obj = document.getElementById("standardSetup");
			obj.style.display = 'none';
		}
		
function toggleStandard()
		{
			var obj;
			obj = document.getElementById("standardSetup");
			obj.style.display = 'block';
			
			var obj;
			obj = document.getElementById("wirelessSetup");
			obj.style.display = 'none';
		}

function productPopup(url) {
	var width = 525;
	var height = 350;
	var left = (screen.width-width)/2;
	var top = (screen.height*0.8-height)/2;
		
	newWin = window.open(url, "popup", "width="+width+",height="+height+",toolbar=no,location=no,directories=no,resizable=no,status=no,menubar=no,screenX=100,screenY=100, left="+left+", top="+top);
}

function openpopup(strUrl, intWidth, intHeight, showToolBars) {
	var left = (screen.width-intWidth)/2;
	var top = (screen.height*0.8-intHeight)/2;
	var toolCode;
	if(showToolBars != true) toolCode = "toolbar=no,location=no,directories=no,resizable=no,status=no,menubar=no,";
		else toolCode = "toolbar=yes,location=yes,directories=yes,resizable=yes,status=yes,menubar=yes,scrollbars=yes,";
	
	newWin = window.open(strUrl, "popup", "width="+intWidth+",height="+intHeight+","+toolCode+"screenX=100,screenY=100, left="+left+", top="+top);
}

// Animates a button when clicked.
// To call, use onClick="startAnim(this);"

var objClickedBtn = '';
var i = 0;
var bolAnimating = false;

function startAnim(btn) {
	if (!bolAnimating) {
		objClickedBtn = btn;
		objClickedBtn.className = 'btndisabled';
		objClickedBtn.disabled = true;
		objClickedBtn.value = 'Please wait   ';
		bolAnimating = true;
		btnanim = setInterval('moretext()', 250);
	}
}
 
function moretext() {
	if (i == 0) {
		objClickedBtn.value = 'Please wait.  ';
	}
	else if (i == 1) {
		objClickedBtn.value = 'Please wait.. ';
	}
	else if (i == 2) {
		objClickedBtn.value = 'Please wait...';
	}
	else if (i == 3) {
		objClickedBtn.value = 'Please wait   ';
		i = -1;
	}
	i++;
}

function bookMarkPage() {
	window.external.AddFavorite(location.href, document.title);
}

function setCookie(name, value, expires, path, domain, secure) {
	var curCookie = name + "=" + escape(value) +
		((expires) ? "; expires=" + expires.toGMTString() : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
	document.cookie = curCookie;
}

function getCookie(name) {
	var dc = document.cookie;
	var prefix = name + "=";
	var begin = dc.indexOf("; " + prefix);
	if (begin == -1) {
	begin = dc.indexOf(prefix);
	if (begin != 0) return null;
	} else
	begin += 2;
	var end = document.cookie.indexOf(";", begin);
	if (end == -1)
	end = dc.length;
	return unescape(dc.substring(begin + prefix.length, end));
}

function deleteCookie(name, path, domain) {
	if (getCookie(name)) {
		document.cookie = name + "=" +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
	
}

function rememberLoginCheck(strCheckID, strInputID) {
	if (document.getElementById(strCheckID).checked) {
		var dtExpires = new Date();
		dtExpires.setTime(dtExpires.getTime() + 2678400000); // 31 days
		
		setCookie('remembercplogin', document.getElementById(strInputID).value, dtExpires);
	}
	else {
		deleteCookie('remembercplogin');
	}
	
	return true;
}

function highlighter(element_id, state) {
	element = document.getElementById(element_id);
	
	if(state == 1) {
		element.className = 'highlight'
	}else{
		element.className = '';
	}
}


function gotoUrl(url) {
	window.location = url;
}