/*** Design Lab Flash Applications Author: Michael Kinkaid (mkinkaid@inorbital.com) | Version: 1 ***/
var intervalID=0;var side;var designXML;function loadFont(strFontName)
{getMovieName("designLab").applyFont(strFontName);}
function OpenFontSelector()
{var theTop=(screen.height/2)-(600/2);var theLeft=(screen.width/2)-(780/2);var features="height=600,width=780,top="+theTop+",left="+theLeft+",status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes";window.open("selectFont.asp","_blank",features);}
function getMovieName(movieName)
{if(navigator.appName.indexOf("Microsoft")!=-1){return window[movieName]}
else{return document[movieName]}}
function completeUpload(str_userName,str_uploadedFileName,str_thumbWidth,str_thumbHeight)
{getMovieName("designLab").loadImage(str_userName,str_uploadedFileName,str_thumbWidth,str_thumbHeight);}
function openUpload()
{var theTop=(screen.height/2)-(300/2);var theLeft=(screen.width/2)-(500/2);var features="height=300,width=500,top="+theTop+",left="+theLeft+",status=yes,toolbar=no,menubar=no,location=no";window.open("uploadImage.asp","_blank",features);return"success";}
function OpenClipArtGallery()
{var theTop=(screen.height/2)-(600/2);var theLeft=(screen.width/2)-(780/2);var features="height=600,width=780,top="+theTop+",left="+theLeft+",status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes";window.open("../../clipArtGallery/ClipArt.asp","_blank",features);return"success";}
function OpenSponsorClipArt()
{var theTop=(screen.height/2)-(600/2);var theLeft=(screen.width/2)-(780/2);var features="height=600,width=780,top="+theTop+",left="+theLeft+",status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes";window.open("../../clipArtGallery/ClipArt.asp?categorySelectBox=18","_blank",features);return"success";}
function AlertSignInToPublish()
{var answer=confirm("You must register to exhibit this design.  Register now?");if(answer)
{getMovieName("designLab").startRegistration();}}
function AlertRegisterToSave()
{var answer=confirm("You must register to save this design.  Register now?");if(answer)
{getMovieName("designLab").startRegistration();}}
function AlertRegisterToAddMyImage()
{var answer=confirm("You must register to use My Images.  Register now?");if(answer)
{getMovieName("designLab").startRegistration();}}
function PromptResetDesign()
{var answer=confirm("Are you sure you want to reset the design?");if(answer)
{getMovieName("designLab").handleReset();}
else
{}}
function setClipArt(image_src,image_name,image_width,image_height)
{getMovieName("designLab").loadClipArt(image_src,image_name,image_width,image_height);}
function AddFromMyImages()
{var theTop=(screen.height/2)-(225);var theLeft=(screen.width/2)-(300);var features="height=450,width=600,top="+theTop+",left="+theLeft+",status=yes,toolbar=no,menubar=no,location=no";window.open("myImages.asp","_blank",features);return"success";}
function completeFromMyImages(str_userName,str_uploadedFileName,str_thumbWidth,str_thumbHeight)
{getMovieName("designLab").fromMyImages(str_userName,str_uploadedFileName,str_thumbWidth,str_thumbHeight);}
function setupDesignView(valueArray)
{side=valueArray[0];var theTop=(screen.height/2)-(310);var theLeft=(screen.width/2)-(300);var features="height=620,width=600,top="+theTop+",left="+theLeft+",status=yes,toolbar=no,menubar=no,location=no,scrollbars=no";window.open("../designView/designView.html","_blank",features);return"success";}
function setupMonsterView(valueArray)
{side=valueArray[0];var theTop=(screen.height/2)-(300);var theLeft=(screen.width/2)-(300);var features="height=600,width=600,top="+theTop+",left="+theLeft+",status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes";window.open("../monsterView/monsterView.html","_blank",features);return"success";}
function changeAddToUpload()
{getMovieName("designLab").openUploadWindow();}
function openEmailProductWindow(productID)
{var theTop=(screen.height/2)-(530/2);var theLeft=(screen.width/2)-(360/2);var urlString="../../Email/emailProduct.asp?ProductID="+productID;var features="height=530,width=360,top="+theTop+",left="+theLeft+",status=yes,toolbar=no,menubar=no,location=no,scrollbars=no";window.open(urlString,"_blank",features);}
function openPostToBlog(productID)
{var theTop=(screen.height/2)-(280/2);var theLeft=(screen.width/2)-(390/2);var urlString="../../Post-To-Blog/?ProductID="+productID;var features="height=280,width=390,top="+theTop+",left="+theLeft+",status=yes,toolbar=no,menubar=no,location=no,scrollbars=no";window.open(urlString,"_blank",features);}
function alertFromFlash(alertString)
{alert(alertString);}
function openEmailerWindow(fileName)
{var url="../../Email/ComposeEmail.asp?emailImage="+fileName;var theTop=(screen.height/2)-(400/2);var theLeft=(screen.width/2)-(650/2);var features="height=400,width=650,top="+theTop+",left="+theLeft+",status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes";window.open(url,"_blank",features);}
function updateFlashTitle(newTitle)
{getMovieName("designBrowse").changeTitle(newTitle);}
function reportInvalidXMLError()
{alert("Oops!  We hit a problem with your design.  Please try again.  If the problem continues email info@tshirtmonster.ca");}
