// JavaScript Document
function LoadTopImage() {
	var DPCheck = window.name.substr(0,6);
	if (DPCheck == "DuPont") {
		document.TopImage.src = "./images/Top2ClrBkgndDP.jpg";
	} else {
		switch(window.name) {
			case "default.asp":
				document.TopImage.src = "/images/Top2ClrBkgndHome.jpg";
				break;
			case "ContactUs.asp":
				document.TopImage.src = "/images/Top2ClrBkgndContactUs.jpg";
				break;
			case "DisplayPressRoom.asp":
				document.TopImage.src = "/images/Top2ClrBkgndPressRoom.jpg";
				break;
			case "PrintingServices.asp":
				document.TopImage.src = "/images/Top2ClrBkgndPrintServices.jpg";
				break;
			case "XferKit.asp":
				document.TopImage.src = "/images/Top2ClrBkgndPrintServices.jpg";
				break;
			default: document.TopImage.src = "/images/Top2ClrBkgnd.jpg";
		}
	}
}
function testemailaddress(stremail,CurForm,CurFieldID) {
	var emailpattern = /^[A-Z][A-Z_0-9.-]+@[A-Z][A-Z_0-9.-]+\.[A-Z]{3}$/i;
	if (emailpattern.test(stremail)) {
		//alert("This is a good e-mail address")
	}
	else {
		alert("Sorry, but '" + stremail + "' does not appear to be a valid e-mail address.");
		stremail.value = "";
		var TimeOutString = "document." + CurForm + "." + CurFieldID + ".focus()";
		//onChange event forces cursor to next field, therefore must delay re-focus to txtEMailAddID
		setTimeout(TimeOutString,10);
	}
}
function InfoFormIndicator(FormPage) {
	if (FormPage == "NLSignUp.asp") {
		document.getElementById('txtKeepInformed').style.color='#990000';
		document.getElementById('txtKeepInformed').innerHTML='<img src="/images/ArrowsSm2L.gif" style="display:inline;">&nbsp;Keep Informed';
		document.getElementById('tdKeepInformed').style.backgroundColor='#CCCC99';
	} else {
		document.getElementById('txtReqInfo').style.color='#990000';
		document.getElementById('txtReqInfo').innerHTML='<img src="/images/ArrowsSm2L.gif" style="display:inline;">&nbsp;Request Information';
		document.getElementById('tdReqInfo').style.backgroundColor='#CCCC99';
	}
}
function trim(stringToTrim) {
	return stringToTrim.replace(/^\s+|\s+$/g,"");
}
function CustAccess() {
	document.LoginForm.submit();
}
function CharCheck() {
	var keyvalue = window.event.keyCode;
	if (keyvalue==13) document.LoginForm.submit();
}
function ButtonMouseOver(ImageObject,IdVar) {
	var ImgName = "/images/" + IdVar + "MOver.jpg";
	ImageObject.src=ImgName;
}
function ButtonMouseOut(ImageObject) {
	var Imgname = "/images/" + ImageObject.name + ".jpg";
	ImageObject.src=Imgname;
}
function ButtonGifMouseOver(ImageObject,IdVar) {
	var ImgName = "/images/" + IdVar + "MOver.gif";
	ImageObject.src=ImgName;
}
function ButtonGifMouseOut(ImageObject) {
	var Imgname = "/images/" + ImageObject.name + ".gif";
	ImageObject.src=Imgname;
}
function RandomQuote() {
	var RndNum = Math.floor(Math.random()*12);
	var quote = new Array(11);
	quote[0]="Grafika stands out because of how much they care about their customers.";
	quote[1]="Professional is the best way to describe Grafika.";
	quote[2]="They do what they say they’re going to do.";
	quote[3]="I just think they do top-notch, quality print work.";
	quote[4]="Grafika’s quality and on-time delivery are excellent.";
	quote[5]="The quality of their product and their good customer service make Grafika stand out.";
	quote[6]="Grafika does custom printing.  They’re one of the last few domestic rub-on manufacturers.";
	quote[7]="Their sales and customer service are really strong.  They have good people working there who are there for the long haul.";
	quote[8]="They have so many types of printing available.  They’re a multi-dimensional house.";
	quote[9]="They make sure they meet your needs, and it’s a quality product.";
	quote[10]="Grafika is different because of their commitment to our business.";
	quote[11]="The willingness to help us put together what we need, while offering the pricing we need as well, are Grafika’s strengths.";
	document.getElementById('txtCustQuotesHTML').innerHTML='&ldquo;' + quote[RndNum] + '&rdquo;';
}
function LoginFormLoad() {
	//alert ("loading form");
	//document.getElementbyId("txtUname").value = "";
	//document.getElementbyId("txtPword").value = "";
}