//Global variables used by the scrollNewsItems() and changeNewsFonColor() functionsvar g_curNewsIndex = 0;var g_newsYPos = 100;var g_curNewsFontColorIndex = 0;function scrollNewsItems(){	//See if we actually have any news article at all	var tmp = document.getElementById("newsWindow");	if (tmp != null) {		if (tmp.getElementsByTagName('DIV').length > 0){			//Declare our news object			article = tmp.getElementsByTagName('DIV')[g_curNewsIndex];				//First see if we need to unhide the news item			if (g_newsYPos == 100){				article.style.display = "block";			}			//Now increment it's position or set it back to 100 and hide it			if (g_newsYPos > 0) {				g_newsYPos -= 1;				article.style.top = g_newsYPos + "px";				} else {				//We should also reset it's color back to white				article.style.color = "#FFFFFF";				article.style.display = 'none';				g_newsYPos = 100;				g_curNewsIndex += 1;			}			//If we have exceeded the max index for articles start back at 0			if (g_curNewsIndex >= tmp.getElementsByTagName('DIV').length){				g_curNewsIndex = 0;			}			//Now we want to increase the delay if we have reached the top of the news box			if (g_newsYPos <= 0){				//Wait 3 seconds then fade the colors out				setTimeout("changeNewsFontColor(article);",3000);			} else {				setTimeout("scrollNewsItems()",50);			}		}	}}function changeNewsFontColor(){	var fontColor = new Array(10);	fontColor[0] = "#FFFFFF";	fontColor[1] = "#F5F2EB";	fontColor[2] = "#E7DCC9";	fontColor[3] = "#DCCCAD";	fontColor[4] = "#D3BF9A";	fontColor[5] = "#CAB386";	fontColor[6] = "#C1A571";	fontColor[7] = "#B79659";	fontColor[8] = "#A48448";	fontColor[9] = "#977942";	//Change the color, increment the index	article.style.color = fontColor[g_curNewsFontColorIndex];	g_curNewsFontColorIndex += 1;		//Now if we have exceeded the index restart at 0 and go on to the next news item	if (g_curNewsFontColorIndex == fontColor.length) {		g_curNewsFontColorIndex = 0;		setTimeout("scrollNewsItems()",10);	} else {		setTimeout("changeNewsFontColor(article);",100);	}}function openJob(unid){	features = "HEIGHT=500,WIDTH=600,MENUBAR=NO,LOCATION=NO,SCROLLBARS";//	url = "/Jerry/LDIJobs.nsf/webJobsbyDept/" + unid;	url = document.all.jobsDbURL.value + unid;	jobWin = window.open(url,"LibertyCartonJobs",features);}function changeJobTab(tabID){	//No point in doing anything is the tab is already selected	if (document.all[tabID].className == "unselTab"){		newTab = tabID;		if (tabID == "locJobTab") {			newWin = "locJobWin";			oldTab = "overallJobTab";			oldWin = "overallJobWin";		} else {			newWin = "overallJobWin";			oldTab = "locJobTab";			oldWin = "locJobWin";		}		document.all[newTab].className = "selTab";		document.all[newWin].className = "selWin";		document.all[oldTab].className = "unselTab";		document.all[oldWin].className = "unselWin";	}}function autoLaunchWin(){	if (document.all.launchURL.value != ""){		features = "MENUBAR=NO,LOCATION=NO,SCROLLBARS";			url = document.all.launchURL.value;		autoWin = window.open(url,"LibertyCarton",features);	}}function callSearch(){	searchText = document.all.siteSearch.value;	if (searchText != "") {		location.href = document.all.webDbPath.value + "searchResults?OpenForm&loc=overall&search=" + escape(searchText);	}	}function checkKeys(evt){	if (typeof window.event == 'undefined') {		keycode = evt.which;	} else {		keycode = window.event.keyCode;	}	if (keycode == 13) {		callSearch();	}}function changeStyle(obj){	switch(obj.className){		case 'capTitle':			obj.className = 'capTitleMO';			break;		case 'capSubLink':			obj.className = 'capSubLinkMO';			break;		case 'capTitleMO':			obj.className = 'capTitle';			break;		case 'capSubLinkMO':			obj.className = 'capSubLink';			break;		case 'locLinkText':			obj.className = 'locLinkTextMO';			break;		case 'locLinkTextMO':			obj.className = 'locLinkText';			break;		case 'subMenuLink':			obj.className = 'subMenuLinkMO';			break;		case 'subMenuLinkMO':			obj.className = 'subMenuLink';			break;		case 'substrateLink':			obj.className = 'substrateLinkMO';			break;		case 'substrateLinkMO':			obj.className = 'substrateLink';			break;		case 'headerLink':			obj.className = 'headerLinkMO';			break;		case 'headerLinkMO':			obj.className = 'headerLink';			break;	}}function validateContactUsForm(){	var msg = "";	var itemSel = false;	var item2Sel = false;	if (document.all.name.value == ""){		msg = msg + "Your Name\n";	}	if (document.all.company.value == ""){		msg = msg + "Company Name\n";	}	if (document.all.phone.value == ""){		msg = msg + "Phone Number\n";	}	for (i=0;i<document.all.products.length;i=i+1){		if (document.all.products[i].checked == true){			itemSel = true;		}	}	if (itemSel == false){		msg = msg + "Products\n";	}	for (i=0;i<document.all.services.length;i=i+1){		if (document.all.services[i].checked == true){			item2Sel = true;		}	}	if (item2Sel == false){		msg = msg + "Services\n";	}	if (document.all.contactMethod.selectedIndex == 0){		msg = msg + "How would you prefer to be contacted\n";	}	if (document.all.contactMethod.selectedIndex == 1 && document.all.email.value == ""){		msg = msg + "You requested to be notified by email but did not enter an Email Address\n";	}		if (msg != "") {		alert("Please fill in the following fields and resubmit:\n" + msg);		return false;	} else {		return true;	}}function validateCustomBoxForm(){	var msg = "";	var itemSel = false;	var item2Sel = false;	if (document.all.name.value == ""){		msg = msg + "Your Name\n";	}	if (document.all.company.value == ""){		msg = msg + "Company Name\n";	}	if (document.all.phone.value == ""){		msg = msg + "Phone Number\n";	}		if (document.all.boxLength.value == ""){		msg = msg + "Dimensions of Box - Length\n";	}	if (document.all.boxWidth.value == ""){		msg = msg + "Dimensions of Box - Width\n";	}	if (document.all.boxDepth.value == ""){		msg = msg + "Dimensions of Box - Depth\n";	}	if (document.all.qty.value == ""){		msg = msg + "Quantity\n";	}		if (msg != "") {		alert("Please fill in the following fields and resubmit:\n" + msg);		return false;	} else {		return true;	}}