var imgPath = null;
var oldRef = null;
var oldSrc = null;
var is_safari = (document.childNodes)&&(!document.all)&&(!navigator.taintEnabled)&&(!navigator.accentColorName)?true:false;
var is_macIE = (!window.print)?true:false;
var rightNowWeb = /(.*).custhelp.com(.*)/.test(document.location.href);

function preloadImages()
{
	// if the document has images
	if(document.images) {
	
		// if the imageArray doesn't exist then create it
		if(!document.imageArray) document.imageArray = new Array();
	
		// loop through all the images in the page and look for
		// the string "_up." - i added the period(.) to avoid confusion
		// with _up appearing in the id/name (e.g. sign_up_up.gif)
		// and replace "_up." with "_over." and create a new Image
		for(var i=0; i<document.images.length; i++) {
	
			imgSrc = document.images[i].src;
			if(imgSrc.lastIndexOf("-o.") != -1) {
				document.imageArray[i] = new Image();
				document.imageArray[i].src = document.images[i].src.replace("-b.", "-o.");
			}
		}			
	}	
}

function rollOut() 
{
	//abort rollovers if we are on Right Now Web and the browser is Safari or Mac IE (they do not recognize the sources base href)
	if (rightNowWeb && (is_safari || is_macIE)) {
		return;
	}
	
	if(document.images) {
		document.images[oldRef].src = oldSrc;
	}
}

function rollOver(imgRef)
{
	//abort rollovers if we are on Right Now Web and the browser is Safari or Mac IE (they do not recognize the sources base href)
	if (rightNowWeb && (is_safari || is_macIE)) {
		return;
	}
     
	if(document.images) {
		oldRef = imgRef;
		oldSrc = document.images[imgRef].src;
		document.images[imgRef].src = document.images[imgRef].src.replace("-b.", "-o.");
	}
}


//ajax kunwari

var nn4 = (document.layers);
var nn6 = (document.getElementById && !document.all);
var ie4 = (document.all && !document.getElementById);
var ie5 = (document.all && document.getElementById);

function loadPage(id,nestref,url) {
if (nn4) {
var lyr = (nestref)? eval('document.'+nestref+'.document.'+id) : document.layers[id]
lyr.load(url,lyr.clip.width)
}
else if(ie4) parent.contentFRM.location = url;
else if(ie5 || nn6) document.getElementById('contentFRM').src = url;
}

function showPage(id) {
if (ie4) {
document.all[id].innerHTML = parent.contentFRM.document.body.innerHTML;
}
else if(nn6 || ie5) { 
document.getElementById(id).innerHTML = window.frames['contentFRM'].document.getElementById('theBody').innerHTML;
   }
}

//hide - show layer

function expandFirst() {
			document.getElementById(expandFirst.arguments[0]).style.display = "block";
			for (var i=1; i<expandFirst.arguments.length; i++) {
				document.getElementById(expandFirst.arguments[i]).style.display = "none";
			}
		}
function expandCollapse() {
	for (var i=0; i<expandCollapse.arguments.length; i++) {
		var element = document.getElementById(expandCollapse.arguments[i]);
		element.style.display = (element.style.display == "none") ? "block" : "none";
	}
}



function Ynetdesign()	{		loadPage('services-namin',null,'netdesign.html');	}

function Ybandwidth()	{		loadPage('services-namin',null,'bandwidth.html');	}

function Ystreaming()	{		loadPage('services-namin',null,'streaming.html');	}

function Ywebapp()	{		loadPage('services-namin',null,'webapp.html');	}

function Yaudiocon()	{		loadPage('services-namin',null,'audiocon.html');	}
