\n');
}
var aShirts = new Array();
var aDescripion = new Array();
var sImagePath="Images/shirts/";
function resized() {
shirtTypeDiv.style.top=100;
shirtTypeDiv.style.left = 0;
shirtTypeDiv.style.width = document.body.clientWidth;
shirtTypeDiv.style.height = document.body.clientHeight - 100;
shirtKeywordDiv.style.top = 100;
shirtKeywordDiv.style.left = 0;
shirtKeywordDiv.style.width = document.body.clientWidth;
shirtKeywordDiv.style.height = document.body.clientHeight - 100;
shirtResultDiv.style.top = 100;
shirtResultDiv.style.left = 0;
shirtResultDiv.style.width = document.body.clientWidth;
shirtResultDiv.style.height = document.body.clientHeight - 100;
}
function ShowDesign() {
shirtKeywordDiv.style.display='block';
shirtResultDiv.style.display='none';
shirtTypeDiv.style.display='none';
}
function ShowType() {
shirtKeywordDiv.style.display='none';
shirtResultDiv.style.display='none';
shirtTypeDiv.style.display='block';
}
function Search(sSearch,nType,nKeyword) {
aShirts = new Array();
aDescription = new Array();
communicator.SetVariable("nFound",0);
communicator.GotoFrame(0);
communicator.Play();
searchDiv.style.display="block";
/*
if (nKeyword >0) {
alert('searching for keyword '+nKeyword);
}
if (nType > 0) {
alert('searching for type '+nType);
}
if (sSearch>'') {
alert('searching for '+sSearch);
}
*/
searchshirts.SetVariable("nKeyword",nKeyword);
searchshirts.SetVariable("nType",nType);
searchshirts.SetVariable("sSearchText",sSearch);
searchshirts.GotoFrame(0);
searchshirts.Play();
}
var sStuff="stuff";
function searchComplete() {
if (aShirts.length==0) {
alert("No Results Found");
} else {
if (aShirts[0] =="") {
alert("No Results Found");
} else {
communicator.SetVariable("nFound",aShirts.length);
communicator.GotoFrame(0);
communicator.Play();
var sResults="
";
var nMaxCol=parseInt(document.body.clientWidth/432);
var j=1;
for (i=0;i
"+aDescription[i]+"";
//sResults+=" "+aDescription[i]+" | ";
if (j==nMaxCol) {
sResults+="
\n";
j=1;
} else {
j++;
}
}
shirtKeywordDiv.style.display='none';
shirtTypeDiv.style.display='none';
shirtResultDiv.innerHTML="";
shirtResultDiv.scrollTop=0;
shirtResultDiv.style.display='none';
shirtResultDiv.innerHTML=sResults;
shirtResultDiv.style.display='block';
}
}
searchDiv.style.display="none";
}
function searchFailed(sResult) {
searchDiv.style.display="none";
alert("Search Failed: "+sResult);
}
function detailFailed(sResult) {
//searchDiv.style.display="none";
alert("Detail Failed: "+sResult);
}
function ValidateOrder() {
var bValid=true;
sOrder="";
nTotal=0;
for (i=0;i"") {
sOrder+="%0d%0a "+DetailSizeList.rows[i].cells[0].childNodes[0].value+" "+DetailSizeList.rows[i].cells[2].innerText;
nTotal+=(parseInt(DetailSizeList.rows[i].cells[0].childNodes[0].value) * parseFloat(DetailSizeList.rows[i].cells[2].price));
}
}
if (sOrder > "") {
bValid=true;
var aTotal=String(nTotal).split(".");
sOrder+="%0d%0a For a Total of: $"+aTotal[0]+"."+aTotal[1].substr(0,2);
} else {
bValid=false;
}
return bValid;
}
function BuyNow() {
oArgs=new Array();
for (i=0;i"") {
var oItem = new Object();
oItem.name=detailName.innerText;
oItem.number=aShirtDetail[nCurrentDetail].CatelogID;
oItem.price=DetailSizeList.rows[i].cells[2].price;
oItem.quantity=DetailSizeList.rows[i].cells[0].childNodes[0].value;
oArgs[oArgs.length]=oItem;
}
}
if (oArgs.length > 0) {
sDialog="dialogHeight:400px;dialogWidth:500px;";
window.showModalDialog("paypal_purchase.htm",oArgs,sDialog);
} else {
alert('You have not selected any quantity to order');
}
}
function EmailToBuy() {
if (ValidateOrder()) {
window.open("mailto:Artisans@CreativeWonderment.com?subject=New Shirt Order for shirt: "+aShirtDetail[nCurrentDetail].CatelogID+"&body=Please send me Ordering Instructions for shirt:"+aShirtDetail[nCurrentDetail].CatelogID+"\n"+sOrder);
} else {
alert('You have not selected any quantity to order');
}
}
function emailShirt(nAugment) {
var sShirt=aShirts[nAugment].split(".");
window.open("mailto:Artisans@CreativeWonderment.com?subject=Please send me sizing information on shirt: "+aDescription[nAugment]+" "+sShirt[0]+"&body=Please send me sizing information on shirt: "+aDescription[nAugment]+" "+sShirt[0]);
}
function detailComplete() {
detailName.innerText= aShirtDetail[0].Name+"("+aShirtDetail[0].Type+")";
detailPicture.src=sImagePath+"/"+aShirtDetail[0].Picture;
var aDetailSize = aShirtDetail[0].Size;
var aDetailSizeDesc = aShirtDetail[0].SizeDescription;
var aDetailSizePrice = aShirtDetail[0].Price;
sSizeTable="";
if (aShirtDetail.length ==1) {
sAlsoList="Not available in any other shirt style";
} else {
sAlsoList="";
if (aShirtDetail.length>4) {
//sAlsoList="";
}
sAlsoList+="
";
for (i=1;i"+aShirtDetail[i].Type+" | ";
}
sAlsoList+="
";
if (aShirtDetail.length>4) {
//sSizeTable="
";
}
}
detailSize.innerHTML=sSizeTable;
detailAlsoIn.innerHTML=sAlsoList;
searchDiv.style.display="none";
selectDivBack.style.height=document.body.clientHeight;
selectDivBack.style.width=document.body.clientWidth;
shirtDetailDiv.style.top = (parseInt(document.body.clientHeight) - parseInt(shirtDetailDiv.style.height) - 40)/2;
shirtDetailDiv.style.left = (parseInt(document.body.clientWidth) - parseInt(shirtDetailDiv.style.width))/2;
selectDivBack.style.display='block';
shirtDetailDiv.style.display='block';
selectDivBack.style.zIndex=3000;
shirtDetailDiv.style.zIndex=3010;
}
function showDetailAlso(nArray) {
nCurrentDetail=nArray;
detailName.innerText= aShirtDetail[nArray].Name+"("+aShirtDetail[nArray].Type+")";
detailPicture.src=sImagePath+"/"+aShirtDetail[nArray].Picture;
var aDetailSize = aShirtDetail[nArray].Size;
var aDetailSizeDesc = aShirtDetail[nArray].SizeDescription;
var aDetailSizePrice = aShirtDetail[nArray].Price;
sSizeTable="";
if (aShirtDetail.length ==1) {
sAlsoList="Not available in any other shirt style";
} else {
sAlsoList="";
if (aShirtDetail.length>4) {
//sAlsoList="";
}
sAlsoList+="
";
for (i=0;i"+aShirtDetail[i].Type+" | ";
}
}
sAlsoList+="
";
if (aShirtDetail.length > 4) {
//sSizeTable="
";
}
}
detailSize.innerHTML=sSizeTable;
detailAlsoIn.innerHTML=sAlsoList;
}
function showdetail(bShow, sShirt) {
nCurrentDetail=0;
selectDivBack.style.height=document.body.clientHeight;
selectDivBack.style.width=document.body.clientWidth;
shirtDetailDiv.style.top = (parseInt(document.body.clientHeight) - parseInt(shirtDetailDiv.style.height) - 40)/2;
shirtDetailDiv.style.left = (parseInt(document.body.clientWidth) - parseInt(shirtDetailDiv.style.width))/2;
if (bShow) {
aShirt=sShirt.split("/");
aShirt=aShirt[aShirt.length - 1].split(".");
sShirt=aShirt[0];
searchshirts.SetVariable("sDetailText",sShirt);
searchshirts.GotoFrame(5);
searchshirts.Play();
searchDiv.style.display="block";
} else {
selectDivBack.style.zIndex=-1;
shirtDetailDiv.style.zIndex=0;
shirtDetailDiv.style.display='none';
selectDivBack.style.display='none';
}
}
All Shirts priced between $12.00 and $25.00
$3.50 Shipping per shirt
$7.95 Shipping on orders of more than 2 shirts
For Adult Small select a Child's Extra Large
Error=Invalid connection string attribute