function preview() {document.forms[0].action="http://appserver.bcesouth.com/2006/preview.php";document.forms[0].target="_blank";document.forms[0].submit();}function setlabel(op,gohere){which=document.form1.elements[op].selectedIndex;document.form1.elements[gohere].value=document.form1.elements[op].options[which].value;mylength=document.form1.elements[gohere].length;document.form1.elements[gohere].focus();var t=document.form1.elements[gohere].select();//alert (document.form1.elements[op].options[which].value);}function gopast(x){//var t=document.form1.elements[x.name].select();}function doPassVar(args,args2){   var sendText = args.value;     window.document.myFlash.SetVariable(args2, sendText);}function movedown(one,two,three,four,five) {var myvalue="OK";var openarray=new Array();//values for initial testingif(one!=null){var bottom5=eval('document.form1.thetext'+one+'.value')//alert("one="+bottom5)}if (two!=null) {var bottom4=eval('document.form1.thetext'+two+'.value')//alert("two="+bottom4)}if (three!=null) {var bottom3=eval('document.form1.thetext'+three+'.value');//alert("three="+bottom3)}if (four!=null) {var bottom2=eval('document.form1.thetext'+four+'.value');//alert("four="+bottom2)}if (five!=null) {var bottom1=eval('document.form1.thetext'+five+'.value');//alert("five="+bottom1)}//values for end calculationif (five!=null) {var bottom1_='document.form1.thetext'+five+'.value';}if (four!=null) {var bottom2_='document.form1.thetext'+four+'.value';}if (three!=null) {var bottom3_='document.form1.thetext'+three+'.value';}if (two!=null) {var bottom4_='document.form1.thetext'+two+'.value';}if(one!=null){var bottom5_='document.form1.thetext'+one+'.value';}//create an array of values, from bottom to topvar textarray=new Array(bottom5,bottom4,bottom3,bottom2,bottom1);var bottomsup=new Array(bottom1_,bottom2_,bottom3_,bottom4_,bottom5_);//create final arrayvar newtextarray=new Array();//reverse contentstextarray.reverse();var g=0;for (i=0; i<textarray.length; i++){//fill in new array, skip if blankif (textarray[i]!=""){newtextarray[g]=textarray[i];//alert("G is "+g+"\n"+newtextarray[g]);g++;}}if (newtextarray.length<textarray.length) {	document.form1.notify.value="yes";	var difference=textarray.length-newtextarray.length		//shift values	for (i=0; i<newtextarray.length; i++)		{		eval(bottomsup[i]+'=\"'+newtextarray[i]+'\"');						}		//clean up		var goforth=parseInt(i)+parseInt(difference);		for (ii=i; ii<goforth; ii++)		{		eval(bottomsup[ii]+'=\"\"');		}	}}function doitnow() {window.document.myFlash.SetVariable('id',document.form1.id.value);window.document.myFlash.SetVariable('lastmodified',document.form1.lastmodified.value);window.document.myFlash.SetVariable('thetext1',document.form1.thetext1.value);window.document.myFlash.SetVariable('thetext2',document.form1.thetext2.value);window.document.myFlash.SetVariable('thetext3',document.form1.thetext3.value);window.document.myFlash.SetVariable('thetext4',document.form1.thetext4.value);window.document.myFlash.SetVariable('thetext5',document.form1.thetext5.value);window.document.myFlash.SetVariable('thetext6',document.form1.thetext6.value);window.document.myFlash.SetVariable('thetext7',document.form1.thetext7.value);window.document.myFlash.SetVariable('thetext8',document.form1.thetext8.value);window.document.myFlash.SetVariable('thetext9',document.form1.thetext9.value);window.document.myFlash.SetVariable('thetext10',document.form1.thetext10.value);window.document.myFlash.SetVariable('thetext11',document.form1.thetext11.value);window.document.myFlash.SetVariable('thetext12',document.form1.thetext12.value);window.document.myFlash.SetVariable('thetext13',document.form1.thetext13.value);window.document.myFlash.SetVariable('thetext14',document.form1.thetext14.value);window.document.myFlash.SetVariable('thetext15',document.form1.thetext15.value);window.document.myFlash.SetVariable('thetext16',document.form1.thetext16.value);window.document.myFlash.SetVariable('thetext17',document.form1.thetext17.value);window.document.myFlash.SetVariable('thetext18',document.form1.thetext18.value);window.document.myFlash.SetVariable('thetext19',document.form1.thetext19.value);window.document.myFlash.SetVariable('thetext20',document.form1.thetext20.value);window.document.myFlash.SetVariable('admin1',document.form1.admin1.value);window.document.myFlash.SetVariable('admin2',document.form1.admin2.value);window.document.myFlash.SetVariable('admin3',document.form1.admin3.value);window.document.myFlash.SetVariable('admin4',document.form1.admin4.value);window.document.myFlash.SetVariable('admin5',document.form1.admin5.value);window.document.myFlash.SetVariable('admin6',document.form1.admin6.value);window.document.myFlash.SetVariable('admin7',document.form1.admin7.value);window.document.myFlash.SetVariable('admin8',document.form1.admin8.value);window.document.myFlash.SetVariable('admin9',document.form1.admin9.value);window.document.myFlash.SetVariable('admin10',document.form1.admin10.value);window.document.myFlash.SetVariable('ponumber',document.form1.ponumber.value);window.document.myFlash.SetVariable('shiptoname',document.form1.shiptoname.value);window.document.myFlash.SetVariable('shiptoaddress1',document.form1.shiptoaddress1.value);window.document.myFlash.SetVariable('shiptoaddress2',document.form1.shiptoaddress2.value);window.document.myFlash.SetVariable('shiptoaddress3',document.form1.shiptoaddress3.value);window.document.myFlash.SetVariable('shiptocity',document.form1.shiptocity.value);window.document.myFlash.SetVariable('shiptostate',document.form1.shiptostate.value);window.document.myFlash.SetVariable('shiptozip',document.form1.shiptozip.value);window.document.myFlash.SetVariable('shiptocountry',document.form1.shiptocountry.value);window.document.myFlash.SetVariable('company',document.form1.company.value);window.document.myFlash.SetVariable('office',document.form1.office.value);window.document.myFlash.SetVariable('itemcode',document.form1.itemcode.value);window.document.myFlash.SetVariable('cardtype',document.form1.cardtype.value);window.document.myFlash.SetVariable('papertype',document.form1.papertype.value);window.document.myFlash.SetVariable('qty',document.form1.qty.value);window.document.myFlash.SetVariable('ordernumber',document.form1.ordernumber.value);window.document.myFlash.SetVariable('date',document.form1.date.value);window.document.myFlash.SetVariable('status',document.form1.status.value);window.document.myFlash.SetVariable('invoice',document.form1.invoice.value);window.document.myFlash.SetVariable('numoforders',document.form1.numoforders.value);window.document.myFlash.SetVariable('ordertype',document.form1.ordertype.value);window.document.myFlash.SetVariable('orderstock',document.form1.orderstock.value);window.document.myFlash.SetVariable('orderstockcolor',document.form1.orderstockcolor.value);window.document.myFlash.SetVariable('orderinkcolor',document.form1.orderinkcolor.value);window.document.myFlash.SetVariable('itemcode1',document.form1.itemcode1.value);window.document.myFlash.SetVariable('itemcode2',document.form1.itemcode2.value);window.document.myFlash.SetVariable('itemcode3',document.form1.itemcode3.value);window.document.myFlash.SetVariable('customercode',document.form1.customercode.value);window.document.myFlash.SetVariable('routenum',document.form1.routenum.value);window.document.myFlash.SetVariable('extra1',document.form1.extra1.value);window.document.myFlash.SetVariable('extra2',document.form1.extra2.value);window.document.myFlash.SetVariable('extra3',document.form1.extra3.value);window.document.myFlash.SetVariable('extra4',document.form1.extra4.value);window.document.myFlash.SetVariable('sitecode',document.form1.sitecode.value);window.document.myFlash.SetVariable('orderdir',document.form1.orderdir.value);window.document.myFlash.SetVariable('thetext1label',document.form1.thetext1label.value);window.document.myFlash.SetVariable('thetext2label',document.form1.thetext2label.value);window.document.myFlash.SetVariable('thetext3label',document.form1.thetext3label.value);window.document.myFlash.SetVariable('thetext4label',document.form1.thetext4label.value);window.document.myFlash.SetVariable('thetext5label',document.form1.thetext5label.value);window.document.myFlash.SetVariable('thetext6label',document.form1.thetext6label.value);window.document.myFlash.SetVariable('thetext7label',document.form1.thetext7label.value);window.document.myFlash.SetVariable('thetext8label',document.form1.thetext8label.value);window.document.myFlash.SetVariable('thetext9label',document.form1.thetext9label.value);window.document.myFlash.SetVariable('thetext10label',document.form1.thetext10label.value);window.document.myFlash.SetVariable('thetext11label',document.form1.thetext11label.value);window.document.myFlash.SetVariable('thetext12label',document.form1.thetext12label.value);window.document.myFlash.SetVariable('thetext13label',document.form1.thetext13label.value);window.document.myFlash.SetVariable('thetext14label',document.form1.thetext14label.value);window.document.myFlash.SetVariable('thetext15label',document.form1.thetext15label.value);window.document.myFlash.SetVariable('thetext16label',document.form1.thetext16label.value);window.document.myFlash.SetVariable('thetext17label',document.form1.thetext17label.value);window.document.myFlash.SetVariable('thetext18label',document.form1.thetext18label.value);window.document.myFlash.SetVariable('thetext19label',document.form1.thetext19label.value);window.document.myFlash.SetVariable('thetext20label',document.form1.thetext20label.value);window.document.myFlash.SetVariable('admin1label',document.form1.admin1label.value);window.document.myFlash.SetVariable('admin2label',document.form1.admin2label.value);window.document.myFlash.SetVariable('admin3label',document.form1.admin3label.value);window.document.myFlash.SetVariable('admin4label',document.form1.admin4label.value);window.document.myFlash.SetVariable('admin5label',document.form1.admin5label.value);window.document.myFlash.SetVariable('admin6label',document.form1.admin6label.value);window.document.myFlash.SetVariable('admin7label',document.form1.admin7label.value);window.document.myFlash.SetVariable('admin8label',document.form1.admin8label.value);window.document.myFlash.SetVariable('admin9label',document.form1.admin9label.value);window.document.myFlash.SetVariable('admin10label',document.form1.admin10label.value);window.document.myFlash.SetVariable('customeremail',document.form1.customeremail.value);window.document.myFlash.SetVariable('movie',document.form1.movie.value);window.document.myFlash.SetVariable('polabel',document.form1.polabel.value);window.document.myFlash.SetVariable('notes1',document.form1.notes1.value);}function showmovie() {var mymovie=document.form1.movie.value;//alert (document.form1.thetext1.value);var id=document.form1.id.value;var lastmodified=document.form1.lastmodified.value;var thetext1=document.form1.thetext1.value;var thetext2=document.form1.thetext2.value;var thetext3=document.form1.thetext3.value;var thetext4=document.form1.thetext4.value;var thetext5=document.form1.thetext5.value;var thetext6=document.form1.thetext6.value;var thetext7=document.form1.thetext7.value;var thetext8=document.form1.thetext8.value;var thetext9=document.form1.thetext9.value;var thetext10=document.form1.thetext10.value;var thetext11=document.form1.thetext11.value;var thetext12=document.form1.thetext12.value;var thetext13=document.form1.thetext13.value;var thetext14=document.form1.thetext14.value;var thetext15=document.form1.thetext15.value;var thetext16=document.form1.thetext16.value;var thetext17=document.form1.thetext17.value;var thetext18=document.form1.thetext18.value;var thetext19=document.form1.thetext19.value;var thetext20=document.form1.thetext20.value;var admin1=document.form1.admin1.value;var admin2=document.form1.admin2.value;var admin3=document.form1.admin3.value;var admin4=document.form1.admin4.value;var admin5=document.form1.admin5.value;var admin6=document.form1.admin6.value;var admin7=document.form1.admin7.value;var admin8=document.form1.admin8.value;var admin9=document.form1.admin9.value;var admin10=document.form1.admin10.value;var ponumber=document.form1.ponumber.value;var shiptoname=document.form1.shiptoname.value;var shiptoaddress1=document.form1.shiptoaddress1.value;var shiptoaddress2=document.form1.shiptoaddress2.value;var shiptoaddress3=document.form1.shiptoaddress3.value;var shiptocity=document.form1.shiptocity.value;var shiptostate=document.form1.shiptostate.value;var shiptozip=document.form1.shiptozip.value;var shiptocountry=document.form1.shiptocountry.value;var company=document.form1.company.value;var office=document.form1.office.value;var itemcode=document.form1.itemcode.value;var cardtype=document.form1.cardtype.value;var papertype=document.form1.papertype.value;var qty=document.form1.qty.value;var ordernumber=document.form1.ordernumber.value;var date=document.form1.date.value;var status=document.form1.status.value;var invoice=document.form1.invoice.value;var numoforders=document.form1.numoforders.value;var ordertype=document.form1.ordertype.value;var orderstock=document.form1.orderstock.value;var orderstockcolor=document.form1.orderstockcolor.value;var orderinkcolor=document.form1.orderinkcolor.value;var itemcode1=document.form1.itemcode1.value;var itemcode2=document.form1.itemcode2.value;var itemcode3=document.form1.itemcode3.value;var customercode=document.form1.customercode.value;var routenum=document.form1.routenum.value;var extra1=document.form1.extra1.value;var extra2=document.form1.extra2.value;var extra3=document.form1.extra3.value;var extra4=document.form1.extra4.value;var sitecode=document.form1.sitecode.value;var orderdir=document.form1.orderdir.value;var thetext1label=document.form1.thetext1label.value;var thetext2label=document.form1.thetext2label.value;var thetext3label=document.form1.thetext3label.value;var thetext4label=document.form1.thetext4label.value;var thetext5label=document.form1.thetext5label.value;var thetext6label=document.form1.thetext6label.value;var thetext7label=document.form1.thetext7label.value;var thetext8label=document.form1.thetext8label.value;var thetext9label=document.form1.thetext9label.value;var thetext10label=document.form1.thetext10label.value;var thetext11label=document.form1.thetext11label.value;var thetext12label=document.form1.thetext12label.value;var thetext13label=document.form1.thetext13label.value;var thetext14label=document.form1.thetext14label.value;var thetext15label=document.form1.thetext15label.value;var thetext16label=document.form1.thetext16label.value;var thetext17label=document.form1.thetext17label.value;var thetext18label=document.form1.thetext18label.value;var thetext19label=document.form1.thetext19label.value;var thetext20label=document.form1.thetext20label.value;var admin1label=document.form1.admin1label.value;var admin2label=document.form1.admin2label.value;var admin3label=document.form1.admin3label.value;var admin4label=document.form1.admin4label.value;var admin5label=document.form1.admin5label.value;var admin6label=document.form1.admin6label.value;var admin7label=document.form1.admin7label.value;var admin8label=document.form1.admin8label.value;var admin9label=document.form1.admin9label.value;var admin10label=document.form1.admin10label.value;var customeremail=document.form1.customeremail.value;var movie=document.form1.movie.value;var polabel=document.form1.polabel.value;var notes1=document.form1.notes1.value;HTMLstring='<HTML>\n';HTMLstring+='<HEAD>\n';HTMLstring+='<SCRIPT LANGUAGE=JavaScript>\n\<\!\-\-\n';HTMLstring+="function doitnow() {\n\n";//HTMLstring+="alert ('ok');\n";HTMLstring+="window.document.myFlash.SetVariable('id','"+id+"');\nwindow.document.myFlash.SetVariable('lastmodified','"+lastmodified+"');\nwindow.document.myFlash.SetVariable('thetext1','"+thetext1+"');\nwindow.document.myFlash.SetVariable('thetext2','"+thetext2+"');\nwindow.document.myFlash.SetVariable('thetext3','"+thetext3+"');\nwindow.document.myFlash.SetVariable('thetext4','"+thetext4+"');\nwindow.document.myFlash.SetVariable('thetext5','"+thetext5+"');\nwindow.document.myFlash.SetVariable('thetext6','"+thetext6+"');\nwindow.document.myFlash.SetVariable('thetext7','"+thetext7+"');\nwindow.document.myFlash.SetVariable('thetext8','"+thetext8+"');\nwindow.document.myFlash.SetVariable('thetext9','"+thetext9+"');\nwindow.document.myFlash.SetVariable('thetext10','"+thetext10+"');\nwindow.document.myFlash.SetVariable('thetext11','"+thetext11+"');\nwindow.document.myFlash.SetVariable('thetext12','"+thetext12+"');\nwindow.document.myFlash.SetVariable('thetext13','"+thetext13+"');\nwindow.document.myFlash.SetVariable('thetext14','"+thetext14+"');\nwindow.document.myFlash.SetVariable('thetext15','"+thetext15+"');\nwindow.document.myFlash.SetVariable('thetext16','"+thetext16+"');\nwindow.document.myFlash.SetVariable('thetext17','"+thetext17+"');\nwindow.document.myFlash.SetVariable('thetext18','"+thetext18+"');\nwindow.document.myFlash.SetVariable('thetext19','"+thetext19+"');\nwindow.document.myFlash.SetVariable('thetext20','"+thetext20+"');\nwindow.document.myFlash.SetVariable('admin1','"+admin1+"');\nwindow.document.myFlash.SetVariable('admin2','"+admin2+"');\nwindow.document.myFlash.SetVariable('admin3','"+admin3+"');\nwindow.document.myFlash.SetVariable('admin4','"+admin4+"');\nwindow.document.myFlash.SetVariable('admin5','"+admin5+"');\nwindow.document.myFlash.SetVariable('admin6','"+admin6+"');\nwindow.document.myFlash.SetVariable('admin7','"+admin7+"');\nwindow.document.myFlash.SetVariable('admin8','"+admin8+"');\nwindow.document.myFlash.SetVariable('admin9','"+admin9+"');\nwindow.document.myFlash.SetVariable('admin10','"+admin10+"');\nwindow.document.myFlash.SetVariable('ponumber','"+ponumber+"');\nwindow.document.myFlash.SetVariable('shiptoname','"+shiptoname+"');\nwindow.document.myFlash.SetVariable('shiptoaddress1','"+shiptoaddress1+"');\nwindow.document.myFlash.SetVariable('shiptoaddress2','"+shiptoaddress2+"');\nwindow.document.myFlash.SetVariable('shiptoaddress3','"+shiptoaddress3+"');\nwindow.document.myFlash.SetVariable('shiptocity','"+shiptocity+"');\nwindow.document.myFlash.SetVariable('shiptostate','"+shiptostate+"');\nwindow.document.myFlash.SetVariable('shiptozip','"+shiptozip+"');\nwindow.document.myFlash.SetVariable('shiptocountry','"+shiptocountry+"');\nwindow.document.myFlash.SetVariable('company','"+company+"');\nwindow.document.myFlash.SetVariable('office','"+office+"');\nwindow.document.myFlash.SetVariable('itemcode','"+itemcode+"');\nwindow.document.myFlash.SetVariable('cardtype','"+cardtype+"');\nwindow.document.myFlash.SetVariable('papertype','"+papertype+"');\nwindow.document.myFlash.SetVariable('qty','"+qty+"');\nwindow.document.myFlash.SetVariable('ordernumber','"+ordernumber+"');\nwindow.document.myFlash.SetVariable('date','"+date+"');\nwindow.document.myFlash.SetVariable('status','"+status+"');\nwindow.document.myFlash.SetVariable('invoice','"+invoice+"');\nwindow.document.myFlash.SetVariable('numoforders','"+numoforders+"');\nwindow.document.myFlash.SetVariable('ordertype','"+ordertype+"');\nwindow.document.myFlash.SetVariable('orderstock','"+orderstock+"');\nwindow.document.myFlash.SetVariable('orderstockcolor','"+orderstockcolor+"');\nwindow.document.myFlash.SetVariable('orderinkcolor','"+orderinkcolor+"');\nwindow.document.myFlash.SetVariable('itemcode1','"+itemcode1+"');\nwindow.document.myFlash.SetVariable('itemcode2','"+itemcode2+"');\nwindow.document.myFlash.SetVariable('itemcode3','"+itemcode3+"');\nwindow.document.myFlash.SetVariable('customercode','"+customercode+"');\nwindow.document.myFlash.SetVariable('routenum','"+routenum+"');\nwindow.document.myFlash.SetVariable('extra1','"+extra1+"');\nwindow.document.myFlash.SetVariable('extra2','"+extra2+"');\nwindow.document.myFlash.SetVariable('extra3','"+extra3+"');\nwindow.document.myFlash.SetVariable('extra4','"+extra4+"');\nwindow.document.myFlash.SetVariable('sitecode','"+sitecode+"');\nwindow.document.myFlash.SetVariable('orderdir','"+orderdir+"');\nwindow.document.myFlash.SetVariable('thetext1label','"+thetext1label+"');\nwindow.document.myFlash.SetVariable('thetext2label','"+thetext2label+"');\nwindow.document.myFlash.SetVariable('thetext3label','"+thetext3label+"');\nwindow.document.myFlash.SetVariable('thetext4label','"+thetext4label+"');\nwindow.document.myFlash.SetVariable('thetext5label','"+thetext5label+"');\nwindow.document.myFlash.SetVariable('thetext6label','"+thetext6label+"');\nwindow.document.myFlash.SetVariable('thetext7label','"+thetext7label+"');\nwindow.document.myFlash.SetVariable('thetext8label','"+thetext8label+"');\nwindow.document.myFlash.SetVariable('thetext9label','"+thetext9label+"');\nwindow.document.myFlash.SetVariable('thetext10label','"+thetext10label+"');\nwindow.document.myFlash.SetVariable('thetext11label','"+thetext11label+"');\nwindow.document.myFlash.SetVariable('thetext12label','"+thetext12label+"');\nwindow.document.myFlash.SetVariable('thetext13label','"+thetext13label+"');\nwindow.document.myFlash.SetVariable('thetext14label','"+thetext14label+"');\nwindow.document.myFlash.SetVariable('thetext15label','"+thetext15label+"');\nwindow.document.myFlash.SetVariable('thetext16label','"+thetext16label+"');\nwindow.document.myFlash.SetVariable('thetext17label','"+thetext17label+"');\nwindow.document.myFlash.SetVariable('thetext18label','"+thetext18label+"');\nwindow.document.myFlash.SetVariable('thetext19label','"+thetext19label+"');\nwindow.document.myFlash.SetVariable('thetext20label','"+thetext20label+"');\nwindow.document.myFlash.SetVariable('admin1label','"+admin1label+"');\nwindow.document.myFlash.SetVariable('admin2label','"+admin2label+"');\nwindow.document.myFlash.SetVariable('admin3label','"+admin3label+"');\nwindow.document.myFlash.SetVariable('admin4label','"+admin4label+"');\nwindow.document.myFlash.SetVariable('admin5label','"+admin5label+"');\nwindow.document.myFlash.SetVariable('admin6label','"+admin6label+"');\nwindow.document.myFlash.SetVariable('admin7label','"+admin7label+"');\nwindow.document.myFlash.SetVariable('admin8label','"+admin8label+"');\nwindow.document.myFlash.SetVariable('admin9label','"+admin9label+"');\nwindow.document.myFlash.SetVariable('admin10label','"+admin10label+"');\nwindow.document.myFlash.SetVariable('customeremail','"+customeremail+"');\nwindow.document.myFlash.SetVariable('movie','"+movie+"');\nwindow.document.myFlash.SetVariable('polabel','"+polabel+"');\nwindow.document.myFlash.SetVariable('notes1','"+notes1+"');\n";//HTMLstring+="alert ('ok');\n";HTMLstring+="}";HTMLstring+='\/\/\-\-\>\n</SCRIPT>';HTMLstring+='<TITLE>Card Proof for ' +thetext1+'</TITLE>\n';HTMLstring+='</HEAD>\n';HTMLstring+="<BODY bgcolor='#ffffff' onload='doitnow()'>\n";HTMLstring+="<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0\" width=\"512\" height=\"312\" id=\"myFlash\"><param name=movie value=\""+mymovie+"\"><param name=quality value=high><embed src=\""+mymovie+"\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"512\" height=\"312\" name=\"myFlash\" swliveconnect=true></embed></object>";HTMLstring+="</BODY>\n";HTMLstring+="</HTML>";newwindow=window.open();newdocument=newwindow.document;newdocument.write(HTMLstring);newdocument.close();}
