// JavaScript Document

function R50pdfOpen(folder,filename) {
	var theHost = location.host;
	var newUrl = "http://"+theHost+"/50Manuals/PDFOpen.html?a="+folder+"&b="+filename;
	window.open(newUrl, 'Documentation', 'width=900,height=680,toolbar=no,location=no,scrollbars=yes,resizable=yes,status=no,menubar=yes,address=no');
}

function pdfOpen(folder,filename) {
	var theHost = location.host;
	var newUrl = "http://"+theHost+"/37Manuals/PDFOpen.html?a="+folder+"&b="+filename;
	window.open(newUrl, 'Documentation', 'width=900,height=680,toolbar=no,location=no,scrollbars=yes,resizable=yes,status=no,menubar=yes,address=no');
}

function presentationOpen(folder,fileName) {
	var theHost = location.host;
	if (theHost == "support.vaisw.com") {
		theHost="inotes.vaisw.com";
	} else {
		theHost="inotes2.vaisw.com";
	}
	var newUrl = "http://"+theHost+"/Conference2006/"+folder+"/"+fileName;
	window.open(newUrl, 'Presentation', 'width=900,height=680,toolbar=no,location=no,scrollbars=yes,resizable=yes,status=no,menubar=yes,address=no');
}

function presentation07Open(folder,fileName) {
	var theHost = location.host;
	if (theHost == "support.vaisw.com") {
		theHost="inotes.vaisw.com";
	} else {
		theHost="inotes2.vaisw.com";
	}
	var newUrl = "http://"+theHost+"/Conference2007/"+folder+"/"+fileName;
	window.open(newUrl, 'Presentation', 'width=900,height=680,toolbar=no,location=no,scrollbars=yes,resizable=yes,status=no,menubar=yes,address=no');
}

function presentation08Open(folder,fileName) {
	var theHost = location.host;
	if (theHost == "support.vaisw.com") {
		theHost="inotes.vaisw.com";
	} else {
		theHost="inotes2.vaisw.com";
	}
	var newUrl = "http://"+theHost+"/Conference2008/"+folder+"/"+fileName;
	window.open(newUrl, 'Presentation', 'width=900,height=680,toolbar=no,location=no,scrollbars=yes,resizable=yes,status=no,menubar=yes,address=no');
}

function pressKitDownloadLogo(fileName) {
	var theHost = location.host;
	if (theHost == "support.vaisw.com") {
		theHost="inotes.vaisw.com";
	} else {
		theHost="inotes2.vaisw.com";
	}
	var newUrl = "http://"+theHost+"/pressKit/logos/"+fileName+".zip";
	window.location=newUrl;
}

function pressKitDownloadPDF(fileName) {
	var theHost = location.host;
	if (theHost == "support.vaisw.com") {
		theHost="inotes.vaisw.com";
	} else {
		theHost="inotes2.vaisw.com";
	}
	var newUrl = "http://"+theHost+"/pressKit/pdf/"+fileName+".pdf";
	window.open(newUrl, 'pressKitPDF', 'width=900,height=680,toolbar=no,location=no,scrollbars=yes,resizable=yes,status=no,menubar=yes,address=no');
}

function clearField(el) {
	if (el.defaultValue==el.value) {
		el.value = "";
	}
}

function defaultField(el) {
	if (el.value=="") {
		el.value = el.defaultValue;
	}
}

var searchResultsCount=1;

function searchResultRowNum() {
	outputText = "<td class='searchCount' nowrap='nowrap' align='right'>"+searchResultsCount+")</td>";
	document.write(outputText);
	searchResultsCount+=1;
}

function searchResultTitle(URI,title) {
	outputText = "<td class='searchTitle' width='100%'><a href='"+URI+"'>"+title+"</a></td>";
	document.write(outputText);
}

function submitSearch() {
	document.mgnlsearch.submit();
}

// Hide and Show With Arrow


var browserName=navigator.appName;

function displayDetails(elementid,imageid) {
	var theDetail;
	var loopElement;
	var loopDetail;
	var newimg
	
	theDetail = document.getElementById(elementid);
	newimg = document.getElementById(imageid);
		
if (theDetail.style.display=="none") {
	
	for (i=0;i<7;i++) {
		
		loopElement="thedetail"+(i);
		loopImage="arrowimage"+(i);
		theImage=document.getElementById(loopImage);
		theImage.src="images/sidearrow.gif";
		loopDetail=document.getElementById(loopElement);
		loopDetail.style.display="none";
	}
	
		if (browserName=="Microsoft Internet Explorer") {
			theDetail.style.display="inline";
		} else {
			theDetail.style.display="table-cell";
		}
		newimg.src="images/downarrow.gif";
	}
	else {
	theDetail.style.display="none";
	newimg.src="images/sidearrow.gif";
	}
}

// Tab Rollovers

var timeout;
function mouseOverTab(selectedTab) {
	funcCall="selectTab('"+selectedTab+"')";
	timeout=setTimeout(funcCall,500);
}
function mouseOutTab()	 {
	clearTimeout(timeout);
}
function selectTab(selectedTab) {

	clearTimeout(timeout);
	
	var tab1=document.getElementById("tab1");
	var tab2=document.getElementById("tab2");
	var tab3=document.getElementById("tab3");
	var tab4=document.getElementById("tab4");
	var tab5=document.getElementById("tab5");
	var tabClass1=document.getElementById("tabClass1");
	var tabClass2=document.getElementById("tabClass2");
	var tabClass3=document.getElementById("tabClass3");
	var tabClass4=document.getElementById("tabClass4");
	var tabClass5=document.getElementById("tabClass5");

	if (selectedTab == "tab1") {
		tabClass1.className = "tab-here";
		tabClass2.className = "tab";
		tabClass3.className = "tab";
		tabClass4.className = "tab";
		tabClass5.className = "tab";
		tab1.style.zIndex = '5';
		tab2.style.zIndex = '4';
		tab3.style.zIndex = '3';
		tab4.style.zIndex = '2';
		tab5.style.zIndex = '1';
	} else if (selectedTab == "tab2") {
		tabClass1.className = "tab";
		tabClass2.className = "tab-here";
		tabClass3.className = "tab";
		tabClass4.className = "tab";
		tabClass5.className = "tab";
		tab1.style.zIndex = '4';
		tab2.style.zIndex = '5';
		tab3.style.zIndex = '3';
		tab4.style.zIndex = '2';
		tab5.style.zIndex = '1';
	} else if (selectedTab == "tab3") {
		tabClass1.className = "tab";
		tabClass2.className = "tab";
		tabClass3.className = "tab-here";
		tabClass4.className = "tab";
		tabClass5.className = "tab";
		tab1.style.zIndex = '4';
		tab2.style.zIndex = '3';
		tab3.style.zIndex = '5';
		tab4.style.zIndex = '2';
		tab5.style.zIndex = '1';
	} else if (selectedTab == "tab4") {
		tabClass1.className = "tab";
		tabClass2.className = "tab";
		tabClass3.className = "tab";
		tabClass4.className = "tab-here";
		tabClass5.className = "tab";
		tab1.style.zIndex = '4';
		tab2.style.zIndex = '3';
		tab3.style.zIndex = '2';
		tab4.style.zIndex = '5';
		tab5.style.zIndex = '1';
	} else if (selectedTab == "tab5") {
		tabClass1.className = "tab";
		tabClass2.className = "tab";
		tabClass3.className = "tab";
		tabClass4.className = "tab";
		tabClass5.className = "tab-here";
		tab1.style.zIndex = '4';
		tab2.style.zIndex = '3';
		tab3.style.zIndex = '2';
		tab4.style.zIndex = '1';
		tab5.style.zIndex = '5';
	} else {
		alert("Please contact web Admin");
	}
}