﻿<!--

		window.onload = onloadFunctions;
	    
	    function rollon() {
	    	document.getElementById("contactTxt").src="img/contact-active.gif";
	    }
	    
	    function rolloff() {
	    	document.getElementById("contactTxt").src="img/contact.gif";

	    }
	    
	    if (document.images)
	    {
	      preload_image = new Image(25,25); 
	      preload_image.src="img/navBtmActive.gif"; 
	    }

function onloadFunctions()
{
	
	if (document.getElementById("uploadForm"))
	{
		var inputs = document.getElementsByTagName("input");
					
		for (var i = 0; i < inputs.length; i++)  // add the script to obscure the download page on submit. 
		{
			var inputType = inputs[i].getAttribute("type");
			
			if(inputType.toUpperCase() == "SUBMIT")
			{
				inputs[i].onclick = obscureMe;
			}
		}
	}
	
	if (document.getElementById("profileForm"))
	{
		document.getElementById("showCC").onclick = ccPopUp;
	}
	
	if (document.getElementById("ccForm"))
	{
		document.getElementById("cardNum").onfocus = removeValue;	
	}
								
}

function ccPopUp()
{
	var winURL = this.href;
	window.open(winURL, "ccWin", "width=400, height=500, status=no, resizable=yes, directories=no, location=no, menubar=no, titlebar=no, toolbar=no");
	return false;
}

function removeValue()	
{
	this.value = "";	
}

function get_rand()
{
	var random_number = Math.floor(Math.random()*7);
	return random_number;
}


function pull_testimonial()
{

	var whichTesti=get_rand();	

	var testi_array = new Array();
	  testi_array[0] = "We are always in need of  &quot;rush&quot; orders and your company always comes through. We have been using your services for quite awhile and have been very happy with your work. Thanks for all that you do!<br /><br />Michelle and Ralph<br />Catskill Mountain Embroidery and Screen Printing, LLC";
      testi_array[1] = "I find 24 Hour Artwork a very easy system to use and the art work in always fantastic. The support is great and the people are always friendly and helpful when needed.<br /><br />Mickey Arledge<br />www.mickeys.net";
      testi_array[2] = "24 Hour Artwork provides great service at an unbelievable price.  I've submitted intricate designs and not-so-clear graphics and they've turned out great every time.  The speed and quality they provide is astounding.<br /><br />Todd Suire<br />Stately Promos";
      testi_array[3] = "I am so happy with the service, quality, and price of 24 Hour Artwork. I will use them any chance that I can get, and suggest that everyone else who needs these services should as well. I can't say enough good things about them.<br /><br />Mark Wolff<br />Total Promotions Inc";
      testi_array[4] = "Your prompt service and low prices make it easy for us to get the art that we need. I also appreciate your quick responses to any requests or questions I send your way.<br /><br />Jennifer Jordan<br />Kustomize It";
	  testi_array[5] = "We have been using 24 Hour Art for the past two years.  Their speed, professional service and realiability (along with highly competitive pricing) makes them a delight to work with.<br /><br />Rhona Kerr<br />Alrho Creative Promotions";
	  testi_array[6] = "Reliable 24-Hour Service I can count on – and do so regularly! 24-Hour really works/cooperates with me to assure that we satisfy our ultimate customer! Overnight Service that I have come to take for granted, without delay!<br /><br />John Calardo<br />PROforma GRAFIX";


    var theTestimonial = testi_array[whichTesti];

	return theTestimonial;

}

var imageWindow;

function showImagePage(imgPageUrl)

{
	imageWindow = window.open(imgPageUrl, "imagePage", "width=500,height=500,resizable=no,status=yes,menubar=no,location=no,scrollbars=no");
	imageWindow.focus();
	return false;
}

// create a div that will obscure the upload pages after the submit btn's been pushed. 

function obscureMe()	{
	if (!document.createElement) return false;
	if (!document.getElementById) return false;
	
	var obscuringDiv = document.createElement("div");
	var theBody = document.getElementsByTagName('body')[0];
//	var docHeight = document.body.offsetHeight;
		
	var arrowAd = document.getElementById("arrowLink").cloneNode(false);
	var arrowAdImg = document.getElementById("arrowAd").cloneNode(false);
	arrowAd.removeAttribute("id");	
	arrowAd.setAttribute("id", "obscuringAd");

	obscuringDiv.setAttribute("id", "submitObscuringDiv");
//	obscuringDiv.style.height = docHeight;
		
	insertAfter(theBody, obscuringDiv, theBody.childNodes[0]);
			
	var pleaseWaitMessageDiv = document.createElement("div");
	var pleaseWaitMessageHead = document.createElement("h1");
	var pleaseWaitMessageP = document.createElement("p");
	var pleaseWaitMessageP2 = document.createElement("p");

	var pleaseWaitMessageHeadText = "PLEASE STAND BY...YOUR ORDER IS BEING SENT.";
	var pleaseWaitMessagePText = "DO NOT CLOSE this page or click the BACK button until you are taken to the Order Confirmation page where you will receive an order number. Please call us if you do not receive an order number for this order.";
	var pleaseWaitMessagePText2 = "While you're waiting check out our partner Arrow Emblems. The fastest source on the planet for Pins, Medals, Patches, Silicone Bracelets, and Lanyards. Click on the image below. It will open in a new window and not affect your upload.";
	var messageHeadingNode = document.createTextNode(pleaseWaitMessageHeadText);
	var messageTextNode = document.createTextNode(pleaseWaitMessagePText);
	var messageTextNode2 = document.createTextNode(pleaseWaitMessagePText2);	
	var leftMarginWidth = document.body.offsetWidth/2 - 300;
	

	pleaseWaitMessageHead.appendChild(messageHeadingNode);
	pleaseWaitMessageP.appendChild(messageTextNode);
	pleaseWaitMessageP2.appendChild(messageTextNode2);	
	pleaseWaitMessageDiv.appendChild(pleaseWaitMessageHead);
	pleaseWaitMessageDiv.appendChild(pleaseWaitMessageP);
	pleaseWaitMessageDiv.appendChild(pleaseWaitMessageP2);
	pleaseWaitMessageDiv.appendChild(arrowAd);
	arrowAd.appendChild(arrowAdImg);
	pleaseWaitMessageDiv.setAttribute("id", "pleaseWaitBlurb");
	pleaseWaitMessageDiv.style.marginLeft = leftMarginWidth + "px";
	
	insertAfter(theBody, pleaseWaitMessageDiv, document.getElementById("submitObscuringDiv"));
		
	arrowAd.style.marginLeft = (600 - 427)/2 + "px";
	
}

function insertAfter(parent, node, referenceNode) {
	
	parent.insertBefore(node, referenceNode.nextSibling);		
}



-->

