
image1 = new Image();
image1.src = "images/leftbkg.jpg";

image2 = new Image();
image2.src = "images/leftbott.jpg";

image3 = new Image();
image3.src = "images/logotop.jpg";

image4 = new Image();
image4.src = "images/titletop.jpg";

image5 = new Image();
image5.src = "images/topban.jpg";

image6 = new Image();
image6.src = "images/womtop.jpg";

image7 = new Image();
image7.src = "images/menu/aboutg.gif";

image8 = new Image();
image8.src = "images/menu/aboutb.gif";

image9 = new Image();
image9.src = "images/menu/contactg.gif";

image10 = new Image();
image10.src = "images/menu/contactb.gif";

image11 = new Image();
image11.src = "images/menu/homeg.gif";

image12 = new Image();
image12.src = "images/menu/homeb.gif";

image13 = new Image();
image13.src = "images/menu/portg.gif";

image14 = new Image();
image14.src = "images/menu/portb.gif";

image15 = new Image();
image15.src = "images/menu/servicesg.gif";

image16 = new Image();
image16.src = "images/menu/servicesb.gif";

image17 = new Image();
image17.src = "images/menu/shopg.gif";

image18 = new Image();
image18.src = "images/menu/shopb.gif";

image19 = new Image();
image19.src = "images/rotatebkg.gif";

image20 = new Image();
image20.src = "images/emailbttn.gif";

image21 = new Image();
image21.src = "images/menu/stockg.gif";

image22 = new Image();
image22.src = "images/menu/stock.gif";

image23 = new Image();
image23.src = "images/menu/corpgiftg.gif";

image24 = new Image();
image24.src = "images/menu/corpgiftb.gif";

function popwin (url) {
	window.open(url,"pop","top=0, left=380, width=410, height=500, scrollbars=yes")
	
}


var X_now = new Date();
var X_days = new Array('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
var X_months = new Array('January','February','March','April','May','June','July','August','September','October','November','December');
var X_date = ((X_now.getDate()<10) ? "0" : "")+ X_now.getDate();

function fourdigits(number)    {
   return (number < 1000) ? number + 1900 : number;
                               }

X_today =  X_days[X_now.getDay()] + ", " +
              X_months[X_now.getMonth()] + " " +
               X_date + ", " +
                (fourdigits(X_now.getYear())) ;


function changeIt(ImageToChange, ImageToShow) {		
if (document.images) { document[ImageToChange].src = ImageToShow; } }		
function bar(message) {		
if (document.images) { window.status = message; return true } }	



function checkFields() {
missinginfo = "";
if (document.form.name.value == "") {
missinginfo += "\n     -  First Name";
}
if (document.form.lastname.value == "") {
missinginfo += "\n     -  Last Name";
}
if (document.form.company.value == "") {
missinginfo += "\n     -  Company Name";
}
if (document.form.area.value == "") {
missinginfo += "\n     -  Area Code";
}
if (document.form.phone.value == "") {
missinginfo += "\n     -  Phone";
}
if ((document.form.mail.value == "") || 
(document.form.mail.value.indexOf('@') == -1) || 
(document.form.mail.value.indexOf('.') == -1)) {
missinginfo += "\n     -  Email address";
}
if(document.form.design.value == "") {
missinginfo += "\n     -  Design #";
}
if(document.form.quantity.value == "") {
missinginfo += "\n     -  Quantity";
}
if(document.form.billaddress.value == "") {
missinginfo += "\n     -  Billing Address";
}
if(document.form.billcity.value == "") {
missinginfo += "\n     -  Billing City";
}
if(document.form.billstateprov.value == "") {
missinginfo += "\n     -  Billing State/Province";
}
if(document.form.billzipcode.value == "") {
missinginfo += "\n     -  Billing Zip/Postal Code";
}
if(document.form.billcountry.value == "") {
missinginfo += "\n     -  Billing Country";
}



if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"You failed to correctly fill in your:\n" +
missinginfo + "\n_____________________________" +
"\nPlease re-enter and submit again!";
alert(missinginfo);
return false;
}
else return true;
}


function placeFocus() {
if (document.forms.length > 0) {
var field = document.forms[0];
for (i = 0; i < field.length; i++) {
if ((field.elements[i].type == "text") || (field.elements[i].type == "textarea") || (field.elements[i].type.toString().charAt(0) == "s")) {
document.forms[0].elements[i].focus();
break;
         }
      }
   }
}


function validate(field) {
var valid = "0123456789"
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no") {
alert("Invalid entry!  Only numbers are accepted!");
field.focus();
field.select();
   }
}


function writepop(product) {
Popwin2=window.open("","pop","top=0, left=380, width=410, height=450, scrollbars=no")
Content ='<html>';
Content+='<head>';
Content+='<link rel="stylesheet" type"text/css" href="divine.css">';
Content+='<title>product</title>';
Content+='</head>';
Content+='<body onblur="self.focus();">';
Content+='<img src="images/shop/'+product+'" width="400" height="400">';
Content+='<p align="right" class="a10r" style="cursor:hand" onclick="self.close();">Close Window</p>';
Content+='</body>';
Content+='</html>';
Popwin2.document.write(Content);
Popwin2.document.close();
}


function writepop2(product) {
Popwin2=window.open("","pop","top=0, left=380, width=410, height=450, scrollbars=no")
Content ='<html>';
Content+='<head>';
Content+='<link rel="stylesheet" type"text/css" href="divine.css">';
Content+='<title>product</title>';
Content+='</head>';
Content+='<body onblur="self.focus();">';
Content+='<img src="images/stockdesign/'+product+'" width="400" height="400">';
Content+='<p align="right" class="a10r" style="cursor:hand" onclick="self.close();">Close Window</p>';
Content+='</body>';
Content+='</html>';
Popwin2.document.write(Content);
Popwin2.document.close();
}

function writepop3(product2) {
Popwin3=window.open("","pop","top=0, left=480, width=310, height=350, scrollbars=no")
Content ='<html>';
Content+='<head>';
Content+='<link rel="stylesheet" type"text/css" href="divine.css">';
Content+='<title>Portfolio</title>';
Content+='</head>';
Content+='<body onblur="self.focus();">';
Content+='<img src="images/portfolio/'+product2+'" width="300" height="300">';
Content+='<p align="right" class="a10r" style="cursor:hand" onclick="self.close();">Close Window</p>';
Content+='</body>';
Content+='</html>';
Popwin3.document.write(Content);
Popwin3.document.close();
}

function writepop4(product) {
Popwin2=window.open("","pop","top=0, left=380, width=360, height=430, scrollbars=no")
Content ='<html>';
Content+='<head>';
Content+='<link rel="stylesheet" type"text/css" href="divine.css">';
Content+='<title>product</title>';
Content+='</head>';
Content+='<body onblur="self.focus();">';
Content+='<img src="images/'+product+'" width="340" height="380">';
Content+='<p align="right" class="a10r" style="cursor:hand" onclick="self.close();">Close Window</p>';
Content+='</body>';
Content+='</html>';
Popwin2.document.write(Content);
Popwin2.document.close();
}


function adpop() {
Popwin4=window.open("adchris.htm","adpop","top=0, left=250, width=350, height=310, scrollbars=no")
}

function ShowData() {
	var val1 = document.formone.tssize.value;
	var val2 = document.formone.tscolor.value;
	var val3 = document.formone.embroid.value;
	var val4 = document.formone.sot.value;
	var val5 = document.formone.font.value;
	var val6 = document.formone.stitchcolor.value;
	var val7 = document.formone.fontplace.value;
	var val8 = document.formone.amount.value;
	document.formone.os0.value = val1 +=', ' + val2;
	document.formone.os1.value = val3 +=', ' + val4  + val5  + val6 + val7;
}

var theImages = new Array()
theImages[0] = 'images/intro1.jpg'
theImages[1] = 'images/intro2.jpg'

// do not edit anything below this line

var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}

