var doc,sty;if(document.layers){doc="document.all.";sty=".style";}
else if(document.getElementById){doc="document.getElementById('";sty="').style";}
function blocknone(divname,state){divObj=eval(doc+divname+sty);divObj.display=state;}
var active_tabcontent=null;function closeallmenus(){if(active_tabcontent!=null){blocknone(active_tabcontent,'none');}}
function controlsubmenu(tabcontent){closeallmenus();blocknone(tabcontent,'block');active_tabcontent=tabcontent;}
function sendGiftHint(){document.giftHint.their_name3.value=document.giftHint.your_name.value;document.giftHint.their_email3.value=document.giftHint.your_email.value;}
function showBuy(){self.name="parentWindow";popup=window.open("http://www.ancientassets.com/why-buy.php","Buy","directories=0, location=0, menubar=0, resizable=1, status=0, scrollbars=1, toolbar=0, width=600, height=480");popup.document.close();}
function showShipping(shippingURL){popup=window.open(shippingURL,"Shipping","directories=0, location=0, menubar=0, resizable=1, status=0, scrollbars=0, toolbar=0, width=436, height=328");popup.moveTo(48,48);popup.document.close();}
function showCreditCard(ccURL){popup=window.open(ccURL,"CreditCard","directories=0, location=0, menubar=0, resizable=1, status=0, scrollbars=0, toolbar=0, width=660, height=400");popup.moveTo(48,48);popup.document.close();}
function validateForm(){valid=true;if((document.forms[0].ShippingSame[0].checked==false)&&(document.forms[0].ShippingSame[1].checked==false)){alert("Please choose if the shipping address is the same as your billing address.");valid=false;}
return valid;}
function clearForm(){document.forms[0].BillFirstName.value="";document.forms[0].BillLastName.value="";document.forms[0].BillCompany.value="";document.forms[0].BillAddress.value="";document.forms[0].BillCity.value="";document.forms[0].BillStateSelect.value="";document.forms[0].BillState.value="";document.forms[0].BillZip.value="";document.forms[0].BillCountry.value="";document.forms[0].BillPhone.value="";document.forms[0].BillEmail.value="";}
function changeInputs(){var els=document.getElementsByTagName('input');var elsLen=els.length;var i=0;for(i=0;i<elsLen;i++){if(els[i].getAttribute('type')){if(els[i].getAttribute('type')=="button")
els[i].className='button';if(els[i].getAttribute('type')=="submit")
els[i].className='button';if(els[i].getAttribute('type')=="text")
els[i].className='formField';if(els[i].getAttribute('type')=="password")
els[i].className='formField';}}}
function getElementsByClass(searchClass,node,tag){var classElements=new Array();if(node==null)
node=document;if(tag==null)
tag='*';var els=node.getElementsByTagName(tag);var elsLen=els.length;var pattern=new RegExp("(^|\\s)"+searchClass+"(\\s|$)");for(i=0,j=0;i<elsLen;i++){if(pattern.test(els[i].className)){classElements[j]=els[i];j++;}}
return classElements;}
function insertAfter(newElement,targetElement){var parent=targetElement.parentNode;if(parent.lastChild==targetElement){parent.appendChild(newElement);}
else{parent.insertBefore(newElement,targetElement.nextSibling);}}
function buttonEndings(){if(!document.getElementsByTagName){return false;}
var buttons=getElementsByClass("button");for(i=0;i<buttons.length;i++){var div=document.createElement("div");div.className="buttonEnding";insertAfter(div,buttons[i]);}}

var p7tpa=new Array();var isIE5=(navigator.appVersion.indexOf("MSIE 5")>-1);function P7_setTP(){var i,j,h="<sty"+"le type=\"text/css\">\n";h+=".p7TP_tabs{display: block;}\n";if(document.getElementById){for(i=1;i<11;i++){h+="#p7tpc"+i+"_1 {display:block;}\n";for(j=2;j<11;j++){h+="#p7tpc"+i+"_"+j+" {display:none;}\n";}}
h+="\n<"+"/sty"+"le>";document.write(h);}}
P7_setTP();function P7_initTP(){var i,j,tb,tD,tP,tA,pb="p7TP";if(!document.getElementById){return;};p7tpa=arguments;for(i=1;i<11;i++){tb=pb+i;tP=document.getElementById(tb);if(tP){tD=tP.getElementsByTagName("DIV");if(tD){for(j=0;j<tD.length;j++){if(tD[j].id&&tD[j].id.indexOf("p7tpb")==0){tA=tD[j].getElementsByTagName("A");if(tA[0]){tA[0].p7tpn=new Array(i,tD[j].id);tA[0].onclick=function(){return P7_TPtrig(this);};}}}}}}}
function P7_TPtrig(a){var i,tD,tA,tC,c,d,sb,an=p7tpa[1],wP,h,cP,ch,hD,hh;if(typeof(a)!='object'){c=a.replace("p7tpc","p7tpb");d=document.getElementById(c);if(d){a=d.getElementsByTagName("A")[0];}}
if(a.p7tpn){tD=document.getElementById(a.p7tpn[1]);if(tD){tA=tD.parentNode.getElementsByTagName("A");if(an==29&&!isIE5){wP=P7_getCD(a);h=P7_getPH(wP);cP=getTPc(a);ch=P7_getPH(cP);hD=h-ch;if(window.opera){P7_setPW(wP);}
wP.style.height=h+"px";wP.style.overflow="hidden";}
for(i=0;i<tA.length;i++){if(tA[i].p7tpn){sb=tA[i].p7tpn[1].replace("p7tpb","p7tpc");tC=document.getElementById(sb);if(tA[i]==a){tA[i].className="down";document.getElementById(tA[i].p7tpn[1]).className="down";if(tC){if(an>0&&an!=29){tC.style.visibility="hidden"
tC.style.display="block";setTimeout("P7_TPanim('"+tC.id+"')",100);}
else{tC.style.display="block";}
if(an==29&&!isIE5){hh=P7_getPH(tC);P7_TPglide(tC.id,h,hh+hD);}}}
else{tA[i].className='';document.getElementById(tA[i].p7tpn[1]).className='';if(tC){tC.style.display="none";}}}}}}
if(typeof(P7_colH2)=='function'){P7_colH2();}
if(typeof(P7_colH)=='function'){P7_colH();}
return false;}
function P7_TPanim(iD){var i,f,tC,g=new Array(),an=p7tpa[1],ob=document.getElementById(iD);tC=ob.parentNode;if(!tC.filters){ob.style.opacity="0.10";ob.style.visibility='visible';P7_TPfadeIn(ob.id,0.00);return;}
f='progid:DXImageTransform.Microsoft.';d=' Duration=1';g[0]='Fade';g[1]='Fade';g[2]='Wipe(GradientSize=0.5, wipeStyle=0, motion="forward"'+d+')';g[3]='Pixelate(MaxSquare=50,Duration=1,Enabled=false'+d+')';g[4]='RandomDissolve('+d+')';g[5]='Iris(irisstyle="SQUARE", motion="in"'+d+')';g[6]='Iris(irisstyle="SQUARE", motion="out"'+d+')';g[7]='Iris(irisstyle="CIRCLE", motion="in"'+d+')';g[8]='Iris(irisstyle="CIRCLE", motion="out"'+d+')';g[9]='Blinds(direction="up", bands=1'+d+')';g[10]='Blinds(direction="down", bands=1'+d+')';g[11]='Blinds(direction="right", bands=1'+d+')';g[12]='Blinds(direction="left", bands=1'+d+')';g[13]='Barn(orientation="vertical", motion="in"'+d+')';g[14]='Barn(orientation="vertical", motion="out"'+d+')';g[15]='Barn(orientation="horizontal", motion="in"'+d+')'
g[16]='Barn(orientation="horizontal", motion="out"'+d+')'
g[17]='Strips(motion="leftdown"'+d+')';g[18]='Strips(motion="leftup"'+d+')';g[19]='Strips(motion="rightdown"'+d+')';g[20]='Strips(motion="rightup"'+d+')';g[21]='RadialWipe(wipeStyle="clock"'+d+')';g[22]='RadialWipe(wipeStyle="wedge"'+d+')';g[23]='RadialWipe(wipeStyle="radial"'+d+')';g[24]='Slide(slideStyle="PUSH", bands=1'+d+')';g[25]='Slide(slideStyle="SWAP", bands=5'+d+')';g[26]='Slide(slideStyle="HIDE", bands=1'+d+')';g[27]='Wheel(spokes=4'+d+')';g[28]='Wheel(spokes=16'+d+')';an=(an>g.length)?3:an;f+=g[an];tC.style.filter=f;if(tC.filters.length<1){p7tpa[1]=0;ob.style.visibility='visible';return;}
tC.filters[0].Apply();ob.style.visibility='visible';tC.filters[0].Play();}
function P7_TPfadeIn(id,op){var d=document.getElementById(id);op+=.05;op=(op>=1)?1:op;d.style.opacity=op;if(op<1){setTimeout("P7_TPfadeIn('"+id+"',"+op+")",60);}}
function P7_getPH(d){var h,nh,dh,oh;d.style.height="auto";oh=d.offsetHeight;d.style.height=oh+"px";nh=d.offsetHeight;if(oh!=nh){nh=(oh-(nh-oh));}
d.style.height="auto";return nh;}
function P7_setPW(d){var w,nw,dw,ow;d.style.width="auto";ow=d.offsetWidth;d.style.width=ow+"px";nw=d.offsetWidth;if(ow!=nw){nw=(ow-(nw-ow));}
d.style.width=nw+"px";}
function P7_getCD(a){var g,tP=a.p7tpn[1].replace("p7tpb","p7tpc");g=document.getElementById(tP);return g.parentNode;}
function getTPc(a){var i,tA,cD,tC=null;tA=a.parentNode.parentNode.getElementsByTagName("A");for(i=0;i<tA.length;i++){if(tA[i].className&&tA[i].className=="down"){cD=tA[i].p7tpn[1].replace("p7tpb","p7tpc");tC=document.getElementById(cD);break;}}
return tC;}
function P7_TPglide(pn,ch,th){var tt,inc,dy=10,w,m;w=document.getElementById(pn).parentNode;m=(ch<=th)?0:1;tt=Math.abs(parseInt(Math.abs(th)-Math.abs(ch)));inc=(tt*.15<1)?1:tt*.15;inc=(m==1)?inc*-1:inc;w.style.height=ch+"px";if(ch==th){w.style.height="auto";w.style.overflow="visible";}
else{ch+=inc;if(m==0){ch=(ch>=th)?th:ch;}
else{ch=(ch<=th)?th:ch;}
if(w.p7tpG){clearTimeout(w.p7tpG);}
w.p7tpG=setTimeout("P7_TPglide('"+pn+"',"+ch+","+th+")",dy);}}

var re_dt=/^(\d{1,2})\-(\d{1,2})\-(\d{4})$/,re_tm=/^(\d{1,2})\:(\d{1,2})\:(\d{1,2})$/,a_formats={'alpha':/^[a-zA-Z\.\-]*$/,'alphanum':/^\w+$/,'unsigned':/^\d+$/,'integer':/^[\+\-]?\d*$/,'real':/^[\+\-]?\d*\.?\d*$/,'email':/^[\w-\.]+\@[\w\.-]+\.[a-z]{2,4}$/,'phone':/^[\d\.\s\-]+$/,'date':function(s_date){if(!re_dt.test(s_date))
return false;if(RegExp.$1>31||RegExp.$2>12)
return false;var dt_test=new Date(RegExp.$3,Number(RegExp.$2-1),RegExp.$1);if(dt_test.getMonth()!=Number(RegExp.$2-1))
return false;return true;},'time':function(s_time){if(!re_tm.test(s_time))
return false;if(RegExp.$1>23||RegExp.$2>59||RegExp.$3>59)
return false;return true;}},a_messages=['No form name passed to validator construction routine.','No array of "%form%" form fields passed to validator construction routine.','Form "%form%" can not be found in this document.','Incomplete "%n%" form field descriptor entry. "l" attribute is missing.','Can not find form field "%n%" in the form "%form%".','Can not find label tag (id="%t%").','Can not verify match. Field "%m%" was not found.','Please fill in "%l%".','Value for "%l%" must be %mn% characters or more.','Value for "%l%" must be no longer than %mx% characters.','Please correct "%l%".','"%l%" must match "%ml%".']
function validator(s_form,a_fields,o_cfg){this.f_error=validator_error;this.f_alert=o_cfg&&o_cfg.alert?function(s_msg){alert(s_msg);return false}:function(){return false};if(!s_form)
return this.f_alert(this.f_error(0));this.s_form=s_form;if(!a_fields||typeof(a_fields)!='object')
return this.f_alert(this.f_error(1));this.a_fields=a_fields;this.a_2disable=o_cfg&&o_cfg['to_disable']&&typeof(o_cfg['to_disable'])=='object'?o_cfg['to_disable']:[];this.exec=validator_exec;}
function validator_exec(){var o_form=document.forms[this.s_form];if(!o_form)
return this.f_alert(this.f_error(2));b_dom=document.body&&document.body.innerHTML;for(var n_key in this.a_fields){this.a_fields[n_key]['n']=n_key;if(!this.a_fields[n_key]['l'])
return this.f_alert(this.f_error(3,this.a_fields[n_key]));o_input=o_form.elements[n_key];if(!o_input)
return this.f_alert(this.f_error(4,this.a_fields[n_key]));this.a_fields[n_key].o_input=o_input;}
if(b_dom)
for(var n_key in this.a_fields)
if(this.a_fields[n_key]['t']){var s_labeltag=this.a_fields[n_key]['t'],e_labeltag=get_element(s_labeltag);if(!e_labeltag)
return this.f_alert(this.f_error(5,this.a_fields[n_key]));this.a_fields[n_key].o_tag=e_labeltag;e_labeltag.className='tfvNormal';}
for(var n_key in this.a_fields){var s_value='';o_input=this.a_fields[n_key].o_input;if(o_input.type=='checkbox')
s_value=o_input.checked?o_input.value:'';else if(o_input.value)
s_value=o_input.value;else if(o_input.options)
s_value=o_input.selectedIndex>-1?o_input.options[o_input.selectedIndex].value:null;else if(o_input.length>0)
for(var n_index=0;n_index<o_input.length;n_index++)
if(o_input[n_index].checked){s_value=o_input[n_index].value;break;}
this.a_fields[n_key]['v']=s_value.replace(/(^\s+)|(\s+$)/g,'');}
var n_errors_count=0,n_another,o_format_check;for(var n_key in this.a_fields){o_format_check=this.a_fields[n_key]['f']&&a_formats[this.a_fields[n_key]['f']]?a_formats[this.a_fields[n_key]['f']]:null;this.a_fields[n_key].n_error=null;if(this.a_fields[n_key]['r']&&!this.a_fields[n_key]['v']){this.a_fields[n_key].n_error=1;n_errors_count++;}
else if(this.a_fields[n_key]['mn']&&this.a_fields[n_key]['v']!=''&&String(this.a_fields[n_key]['v']).length<this.a_fields[n_key]['mn']){this.a_fields[n_key].n_error=2;n_errors_count++;}
else if(this.a_fields[n_key]['mx']&&String(this.a_fields[n_key]['v']).length>this.a_fields[n_key]['mx']){this.a_fields[n_key].n_error=3;n_errors_count++;}
else if(this.a_fields[n_key]['v']&&this.a_fields[n_key]['f']&&((typeof(o_format_check)=='function'&&!o_format_check(this.a_fields[n_key]['v']))||(typeof(o_format_check)!='function'&&!o_format_check.test(this.a_fields[n_key]['v'])))){this.a_fields[n_key].n_error=4;n_errors_count++;}
else if(this.a_fields[n_key]['m']){for(var n_key2 in this.a_fields)
if(n_key2==this.a_fields[n_key]['m']){n_another=n_key2;break;}
if(n_another==null)
return this.f_alert(this.f_error(6,this.a_fields[n_key]));if(this.a_fields[n_another]['v']!=this.a_fields[n_key]['v']){this.a_fields[n_key]['ml']=this.a_fields[n_another]['l'];this.a_fields[n_key].n_error=5;n_errors_count++;}}}
var s_alert_message='',e_first_error;if(n_errors_count){for(var n_key in this.a_fields){var n_error_type=this.a_fields[n_key].n_error,s_message='';if(n_error_type)
s_message=this.f_error(n_error_type+6,this.a_fields[n_key]);if(s_message){if(!e_first_error)
e_first_error=o_form.elements[n_key];s_alert_message+=s_message+"\n";if(b_dom&&this.a_fields[n_key].o_tag)
this.a_fields[n_key].o_tag.className='tfvHighlight';}}
alert(s_alert_message);if(e_first_error.focus&&e_first_error.type!='hidden'&&!e_first_error.disabled)
eval("e_first_error.focus()");return false;}
for(n_key in this.a_2disable)
if(o_form.elements[this.a_2disable[n_key]])
o_form.elements[this.a_2disable[n_key]].disabled=true;alert("Thank you for completing the form!");return true;}
function validator_error(n_index){var s_=a_messages[n_index],n_i=1,s_key;for(;n_i<arguments.length;n_i++)
for(s_key in arguments[n_i])
s_=s_.replace('%'+s_key+'%',arguments[n_i][s_key]);s_=s_.replace('%form%',this.s_form);return s_}
function get_element(s_id){return(document.all?document.all[s_id]:(document.getElementById?document.getElementById(s_id):null));}