function fnOpenWindow(site) {

var sURL;

// links from home page body

if (site == "label" || site == "stamp" || site == "postit") {
sURL = "http://94568sel01.clickprint.com/";
}

else if (site == "promo") {
sURL = "http://selectimaging.logomall.com/";
}

else if (site == "invite") {
sURL = "http://selectimaging.cceasy.com/";
}

else if (site == "clothing") {
sURL = "http://www.companycasuals.com/selectimaging/start.jsp";
}



// links from grey top header

if (site == "home") {
sURL = "http://selectimaging.logomall.com/homepage/default.aspx?DPSV_Id=154723";
}

if (site == "contact") {
sURL = "http://selectimaging.logomall.com/ShoppingCart/ShoppingCart.aspx?DPSV_Id=154725";
}

if (site == "about") {
sURL = "http://selectimaging.logomall.com/MyAccount/MyAccount.aspx?DPSV_Id=154734";
}

if (site == "ftp") {
sURL = "http://selectimaging.logomall.com/WishList/WishList.aspx?DPSV_Id=154735";
}

if (site == "monthly") {
	sURL = "http://visitor.constantcontact.com/optin.jsp?v=001vAZEdqAbSf8pM3W7RUq7kZ0Flewb7xEZ";
}

if (site == "announcements" || site == "greetingcards" || site == "wedding") {
	sURL = "http://selectimaging.cceasy.com/";
}

if (site == "promoitems") {
	sURL = "http://selectimaging.logomall.com/";
}

if (site == "buttons" || site == "postitnotes" || site == "rubberstamps" || site == "labels") {
	sURL = "http://94568sel01.clickprint.com/";
}	
	
if (site == "flyers" || site == "notepads" || site == "postcards" || site == "brochures" || site == "envelopes" || site == "letterhead" || site == "doorhangers" || site == "buscards" || site == "busforms" || site == "signs" || site == "folders") {
	sURL = "http://www.printstorefront.com/orderonline";
}	

if (site == "shirtscaps") {
	sURL = "http://www.companycasuals.com/selectimaging";
}

	
window.open(sURL, "site", "top=20, left=20, width=800, height=600, scrollbars=yes, toolbar=yes, menubar=yes, status=yes, location=yes, resizable=yes");
}

function fnOpenLogin() {
window.open("login.php", "login", "width=500, height=300, top=50, left=50, scrollbars=no, location=no, menubar=no, toolbar=no, status=no, resizable=no");
}

function fnOrderOnLine() {
window.open("http://www.printstorefront.com/orderonline", "orderonline", "width=800, height=600, top=25, left=25, scrollbars=yes, location=yes, menubar=yes, toolbar=yes, status=yes, resizable=yes");
}


function fnValidate() {
var form = document.frmContactSelect;
var re = /^[a-zA-Z]+([a-zA-Z0-9\-\._])*@[a-zA-Z0-9\-_]+(\.[a-zA-Z0-9\-_]+)*\.[a-zA-Z]{2,3}$/;
       if (form.cboContact.value == "") {
       alert("You must select a contact name to proceed.");
       form.cboContact.focus();
       return false;
       }
       if (form.txtFirstName.value == "") {
       alert("Please enter your first name.");
       form.txtFirstName.focus();
       return false;
       }
       if (form.txtLastName.value == "") {
       alert("Please enter your last name.");
       form.txtLastName.focus();
       return false;
       }
       if (form.txtEmail.value == "") {
       alert("Please enter your emal address to proceed.");
       form.txtEmail.focus();
       return false;
       }
       else {
               if (!re.test(form.txtEmail.value)) {
               alert("Please enter a valid email address.");
               form.txtEmail.select();
               return false;
               }
       }
       if (form.txtMessage.value == "") {
       alert("Please enter your message or question to proceed.");
       form.txtMessage.focus();
       return false;
       }

form.hdnStage.value = "1";
form.submit();
}

function fnVerify() {
var form = document.frmUpload;
form.hdnStage.value = "1";
form.submit();
}

function fnUploadMore() {
var form = document.frmUpload;
form.hdnStage.value = "";
form.submit();
}

function fnFinish() {
document.location.href = "ftp_finished.php";
}
function fnHome() {
document.location.href = "index.php";
}
function fnContactUs() {
document.location.href = "contact_select.php";
}


// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 5000

// Duration of crossfade (seconds)
var crossFadeDuration = 5

// Specify the image files
var slide = new Array() // don't touch this
// to add more images, just continue the pattern, adding to the array below

slide[2] = "images/professional_01.jpg";
slide[1] = "images/professional_07.jpg";
slide[0] = "images/professional_06.jpg";
slide[3] = "images/professional_05.jpg";
slide[4] = "images/professional_08.jpg";
slide[5] = "images/professional_04.jpg";

var t;
var j = 0;
var p = slide.length;

var preLoad = new Array();
for (i = 0; i < p; i++) {
   preLoad[i] = new Image();
   preLoad[i].src = slide[i];
}

function runSlideShow() {
   if (document.all) {
	  document.images.SlideShow.style.filter="blendTrans(duration=2)";     
      document.images.SlideShow.filters.blendTrans.Apply();   
   }
   document.images.SlideShow.src = preLoad[j].src;
   		if (document.all) {
    	document.images.SlideShow.filters.blendTrans.Play();    	
   		}
  
  j = j + 1
   	if (j > (p-1)) { 
   		j = 0;
   	}
   	
   t = setTimeout('runSlideShow()', slideShowSpeed);
}