/*gzip*/ 
var GlobalOnResizeQueue=[];function globalonresizefun(){if(GlobalOnResizeQueue.length==0){return;}
var dofunonresize=1;for(var agorq in GlobalOnResizeQueue){if(GlobalOnResizeQueue[agorq][0]!=undefined){dofunonresize=1;try{if(GlobalOnResizeQueue[agorq][1]!=undefined){dofunonresize=0;if(eval(GlobalOnResizeQueue[agorq][1]+'==true')){dofunonresize=1;}}}catch(errorObject){dofunonresize=0;}
if(dofunonresize==1){try{eval(GlobalOnResizeQueue[agorq][0]+'();');}catch(errorObject){}}}}}
var focusimage=1;function mageover(obj,i){document.getElementById('maini').src=obj.src.replace("pettyimg.php","medimg.php");focusimage=i;}
function openbigimg(i){obj=document.getElementById('id_prod').value;addadress="&image="+focusimage;window.open("viewbigimage.php?product="+obj+addadress,"","menubar=no,scrollbars=no,status=no,width=530,height=600");}
function copyshipinbill(obj)
{with(document.formuser)
{BillAddress.value=ShipAddress.value;BillCity.value=ShipCity.value;BillState.value=ShipState.value;BillCountry.value=ShipCountry.value;BillZip.value=ShipZip.value;}}
function test_order_inf()
{res=true;var email=/^.[^\s]+@.[^\s]+\.[A-Za-z]{2,4}$/;var phone=/[0-9]/;msg="";with(document.formuser)
{if(billasship.checked){copyshipinbill();}
if(FName.value==""){msg+="Inter Your Firdt Name!\n";}
if(LName.value==""){msg+="Inter Your Last Name!\n";}
if(!Email.value.match(email)){msg+="Invalid mail format!\n";}
if(Phone.value.length<5){msg+="Invalid phone. Is too short!\n";}else{str=Phone.value;for(i=0;i<str.length;i++){if(!str.charAt(i).match(phone)){msg+="Invalid phone. Using only numeric symbol!\n";break;}}}
msg2="";if(ShipAddress.value.length<4){msg2+="   Invalid Address!\n";}
if(ShipCity.value.length<4){msg2+="   Invalid City!\n";}
if(ShipState.value==""){msg2+="   Select the State!\n";}
if(ShipCountry.value==""){msg2+="   Select the Country!\n";}else if(ShipState.value!=""){if(ShipCountry.value=="US"&&(ShipState.value==""||ShipState.value=="XX")){msg2+="   For "+ShipCountry.options[ShipCountry.selectedIndex].text+" you have to choose the state!\n";}
if(ShipCountry.value!="US"&&ShipState.value!="XX"){msg2+="   There is no such state in "+ShipCountry.options[ShipCountry.selectedIndex].text+"!\n";}}
if(ShipZip.value.length<2){msg2+="   Invalid Zip Code!\n";}
if(msg2!=""){msg+="\nShip Information:\n"+msg2;}
if(!billasship.checked)
{msg2="";if(BillAddress.value.length<4){msg2+="   Invalid Address!\n";}
if(BillCity.value.length<4){msg2+="   Invalid City!\n";}
if(BillState.value==""){msg2+="   Select the State!\n";}
if(BillCountry.value==""){msg2+="   Select the Country!\n";}else if(BillState.value!=""){if(BillCountry.value=="US"&&(BillState.value==""||BillState.value=="XX")){msg2+="   For "+BillCountry.options[BillCountry.selectedIndex].text+" you have to choose the state!\n";}
if(BillCountry.value!="US"&&BillState.value!="XX"){msg2+="   There is no such state in "+BillCountry.options[BillCountry.selectedIndex].text+"!\n";}}
if(BillZip.value.length<2){msg2+="   Invalid Zip Code!\n";}
if(msg2!=""){msg+="\nBill Information:\n"+msg2;}}
if(msg!=""){alert(msg);res=false;}}
return res;}
function stopAllANews(anewsid){for(i=0;i<all_anews.length;i++){try{if(all_anews[i]!=anewsid){document.getElementById("anews"+all_anews[i].toString()).SetVariable("mp3Close",1);}else document.getElementById("anews"+all_anews[i].toString()).SetVariable("mp3Close",0);}catch(errorObject){}}}
function getClientWidth(){return document.compatMode=='CSS1Compat'&&!window.opera?document.documentElement.clientWidth:document.body.clientWidth;}
function getClientHeight(){return document.compatMode=='CSS1Compat'&&!window.opera?document.documentElement.clientHeight:document.body.clientHeight;}
function getDivLoadPos(){iobj=document.getElementById('loading0');w=iobj.width;h=iobj.height;wid=getClientWidth();wid=Math.floor((wid-w)/2);hid=getClientHeight();hid=Math.floor((hid-h)/2);dobj=document.getElementById('divload0');dobj.style.top=hid;dobj.style.left=wid;}
function setElementOpacity(sElemId,nOpacity){var opacityProp=getOpacityProperty();var elem=document.getElementById(sElemId);if(!elem||!opacityProp)return;if(opacityProp=="filter"){nOpacity*=100;var oAlpha=elem.filters['DXImageTransform.Microsoft.alpha']||elem.filters.alpha;if(oAlpha)oAlpha.opacity=nOpacity;else elem.style.filter+="progid:DXImageTransform.Microsoft.Alpha(opacity="+nOpacity+")";}else elem.style[opacityProp]=nOpacity;}
function getOpacityProperty(){if(typeof document.body.style.opacity=='string')
return'opacity';else if(typeof document.body.style.MozOpacity=='string')
return'MozOpacity';else if(typeof document.body.style.KhtmlOpacity=='string')
return'KhtmlOpacity';else if(document.body.filters&&navigator.appVersion.match(/MSIE ([\d.]+);/)[1]>=5.5)
return'filter';return false;}
function replace_item(arr,newsel,newid){if(IntegrityR=='0'){document.getElementById('unwith'+newsel).innerHTML=document.getElementById('label'+newsel+newid).innerHTML;}
if(arr.length>1){testNewSelection(arr,newsel,newid);}
setElementOpacity('maini',0.2);document.getElementById('divload0').style.display='';paramkey='';for(i=0;i<arr.length;i++){karr='';karr+=arr[i];paramkey+=karr;for(j=0;j<CountFilter[arr[i]];j++){obj=document.getElementById(karr+j);if(obj.checked){paramkey+=obj.value;break;}}}
DufProd=new Array();if(IntegrityR=='0'){if(iskey(AllProd,paramkey)){DufProd=AllProd[paramkey];}else{DufProd=['0','<span class="color:#FA0000;">-</span>','0','0'];DufProd[4]=new Array();DufProd[4][0]='no_image.gif';DufProd[5]='0';}}else{DufProd=AllProd[paramkey];}
document.getElementById('id_prod').value=DufProd[0];document.getElementById('bigname').innerHTML=DufProd[1];document.getElementById('priceour').innerHTML='$ '+DufProd[2];document.getElementById('priceuser').innerHTML='$ '+DufProd[3];document.getElementById('maini').src='medimg.php?i='+DufProd[4][0];if(DufProd[5]==1){document.getElementById('add_to_cart').style.display='';document.getElementById('outofstock').style.display='none';}else{document.getElementById('add_to_cart').style.display='none';document.getElementById('outofstock').style.display='';}
imgcount=DufProd[4];for(i=0;i<5;i++){document.getElementById('tbl'+i).style.display='none';}
for(k=0;k<imgcount.length;k++){document.getElementById('tbl'+k).style.display='';document.getElementById('sm'+k).src='pettyimg.php?i='+DufProd[4][k];if(!in_array(DufProd[4][k],LoadingImg)){AllImgOnLoad[k]=1;}}
if(!in_array(DufProd[4][0],LoadingImg)){AllImgOnLoad[5]=1;}}
var AllImgOnLoad=[0,0,0,0,0,0];var LoadingImg=new Array();function loadImg(n,obj){AllImgOnLoad[n]=0;SumLoad=0;iname=obj.src;riname=iname.split('=');if(!in_array(riname[1],LoadingImg)){LoadingImg[LoadingImg.length]=riname[1];}
for(i=0;i<6;i++){SumLoad+=AllImgOnLoad[i];}
if(SumLoad==0){document.getElementById('divload0').style.display='none';setElementOpacity('maini',1);}}
function setColor(oname){document.getElementById(oname).click();}
function in_array(str,narr){for(i=0;i<narr.length;i++){if(str==narr[i]){return true;}}
return false;}
function iskey(myarr,variable_name){try{test=myarr[variable_name];if(typeof(myarr[variable_name])=='undefined')return false;}catch(e){return false;}
return true;}
function testNewSelection(arr,newsel,newid){NewKeyList=new Array();NewKeyList[0]=new Array();NewKeyList[1]=new Array();keySeek=0;paramkey='';for(i=0;i<arr.length;i++){karr='';karr+=arr[i];if(karr==newsel){keySeek++;continue;}
for(j=0;j<CountFilter[arr[i]];j++){obj=document.getElementById(karr+j);addkey='';addkey+=karr;addkey+=obj.value;newarrlen=NewKeyList[keySeek];NewKeyList[keySeek][newarrlen.length]=addkey;}}
LenKeyLists=new Array();for(i=0;i<NewKeyList.length;i++){newarrlen=NewKeyList[i];if(newarrlen.length==0){NewKeyList[i][0]='';newarrlen=NewKeyList[i];}
LenKeyLists[i]=newarrlen.length;}
for(i=0;i<LenKeyLists[0];i++){TestKeyLeft=NewKeyList[0][i];for(j=0;j<LenKeyLists[1];j++){TestKeyRight=NewKeyList[1][j];TestKey=TestKeyLeft+newsel+newid+TestKeyRight;obj=document.getElementById(TestKeyLeft+TestKeyRight);if(!iskey(AllProd,TestKey)){if(IntegrityR=='1'){obj.disabled=true;}else{document.getElementById('un'+TestKeyLeft+TestKeyRight).className='filterNoIntegrity';}}else{obj.disabled=false;if(IntegrityR=='0'){document.getElementById('un'+TestKeyLeft+TestKeyRight).className='filterNoIntegrityW';}}}}}
var vote_is=0;function select_vote_ov(v)
{if(vote_is!=0)return false;for(i=1;i<=5;i++){document.getElementById('vote'+i).src="image/vote_h_gr_"+i+".gif";if(v==i)break;}}
function select_vote_ou(v){if(vote_is!=0)return false;for(i=1;i<=5;i++){document.getElementById('vote'+i).src="image/vote_h_g_"+i+".gif";}}
function click_vote(v){if(vote_is!=0)return false;for(i=1;i<=5;i++){document.getElementById('vote'+i).src="image/vote_h_gr_"+i+".gif";if(v==i)break;}
vote_is=v;votepic=new Image();votepic.src="vote.php?vote="+v+"";return false;}
function country_update(sobj){obj=document.getElementById(sobj+'CountryId0');obj2=document.getElementById(sobj+'StateId0');obj2.options.length=0;obj2.options[obj2.options.length]=new Option(" - Select the state - ","");if(AllCity[obj.value]!=undefined){for(var cabbr in AllCity[obj.value]){if(cabbr.length==2){obj2.options[obj2.options.length]=new Option(AllCity[obj.value][cabbr],cabbr);}}}else{obj2.options[obj2.options.length]=new Option(AllCity['XX']['XX'],'XX');}}
function set_answers_poll(aid){document.getElementById("pollceil1").style.display='none';document.getElementById("ploading0").style.display='';JsHttpRequest.query('do_poll_vote.php?h='+Math.random(),{'aid':aid},function(result,errors){if(result["txt"]!=undefined){if(result["txt"]!='none'){document.getElementById("ploading0").style.display='none';document.getElementById("pollceil1").style.display='';document.getElementById("pollceil0").innerHTML=result["name"];document.getElementById("pollceil1").innerHTML=result["txt"];}}});return false;}
function openballonhint(obj,obj2){document.getElementById(obj).style.display='';setBallonHintPos(obj,obj2);window.onresize=exstraOpenBallonHint;}
function closeballonhint(obj){document.getElementById(obj).style.display='none';window.onresize='';return false;}
function setBallonHintPos(obj,obj2){obj=document.getElementById(obj);obj2=document.getElementById(obj2);pObj=getAlignedPosition(obj2);obj.style.top=(pObj.y-obj.offsetHeight-(isie?ietruebody().scrollTop:0))-(window.opera?20:0)+"px";obj.style.left=(pObj.x-obj.offsetWidth-(isie?ietruebody().scrollLeft:0))-(window.opera?20:0)+"px";}
var isie=document.all&&!window.opera;var isns6=document.getElementById&&!document.all;Number.prototype.NaN0=function(){return isNaN(this)?0:this;};function ietruebody(){return(document.compatMode&&document.compatMode!="BackCompat")?document.documentElement:document.body;}
function getAlignedPosition(e){var left=0;var top=0;while(e.offsetParent){left+=e.offsetLeft+(e.currentStyle?(parseInt(e.currentStyle.borderLeftWidth)).NaN0():0);top+=e.offsetTop+(e.currentStyle?(parseInt(e.currentStyle.borderTopWidth)).NaN0():0);e=e.offsetParent;if(e.scrollLeft)left-=e.scrollLeft;if(e.scrollTop)top-=e.scrollTop;}
var docBody=document.documentElement?document.documentElement:document.body;left+=e.offsetLeft+(e.currentStyle?(parseInt(e.currentStyle.borderLeftWidth)).NaN0():0)+(isie?(parseInt(docBody.scrollLeft)).NaN0():0)-(parseInt(docBody.clientLeft)).NaN0();top+=e.offsetTop+(e.currentStyle?(parseInt(e.currentStyle.borderTopWidth)).NaN0():0)+(isie?(parseInt(docBody.scrollTop)).NaN0():0)-(parseInt(docBody.clientTop)).NaN0();return{"x":left,"y":top};}
function selectPartnerCode(codestr){document.getElementById('partnercodeid').value=codestr;document.getElementById('ballonhint0').style.display='none';document.getElementById('goanych0').click();}
function exstraOpenBallonHint(){openballonhint('ballonhint0','partnercodeid');}
var TplMS=new Array();TplMS[0]="<div style='text-align:center;'><span class='Blue' style='font-size:18px;'><br />Your Shopping Cart is empty.<br /><br /></span></div>";TplMS[1]='<form id="ms_order_list" onsubmit="return false;" enctype="multipart/form-data"><table width="540" border="0" cellspacing="0" cellpadding="0"><tr><td colspan="6" style="height:19px;" class="fn"></td></tr><tr><td style="width:56px;height:28px;">&nbsp;</td><td style="width:184px;">&nbsp;</td><td style="width:78px;">&nbsp;</td><td style="width:65px;" align="center" valign="middle" class="minicell04">PRICE<br />PER UNIT</td><td style="width:70px;">&nbsp;</td><td style="width:87px;">&nbsp;</td></tr>';TplMS[2]='<tr><td style="width:60px;height:56px;" align="center" class="fn nowrap"><a class="sh_name" href="#_link"><img src="http://pimg.desiresecrets.com/pettyimg.php?i=#_img" width="36" height="36" alt="#_name" /></a></td><td class="nowrap" align="left"><a class="sh_name" href="#_link">#_name</a></td><td style="width:80px;" align="center" class="fn nowrap">#_qty</td><td align="left" class="black3 nowrap"><b>$ #_price1</b></td><td align="left" class="black3 nowrap"><b>$ #_price2</b></td><td align="center" class="fn nowrap"><input type="image" name="remove_#_key" onclick="add_in_cart(\'ms_order_list\',\'remove_#_key\');" src="image/remove.png" title="Remove this item" /></td></tr>';TplMS[3]='<tr><td colspan="6" class="minicell2x"></td></tr><tr><td colspan="6" class="minicell3x"></td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td><td class="minicell44">Subtotal:&nbsp;&nbsp;</td><td class="minicell45" align="left">$ #_subtotal</td><td>&nbsp;</td></tr><tr><td style="height:56px;">&nbsp;</td><td colspan="4" align="center"><a href="?action=shoppingcart"><img src="/image/minishop_checkout.png" alt="checkout" border="0" /></a></td><td align="center"><a href="#" onclick="return ClickMiniShoppingTab();"><b>close</b></a></td></tr></table></form>';function openminishopcart(){var obj='aminishopcart';var obj2='minisctable';var test_open=false;document.getElementById("minishopcart_tab").className='minishopcart_b2';openminishopcarthint(obj,obj2);window.onresize=exstraOpenMiniShopCart;return false;}
function openminishopcart(){var obj='aminishopcart';var obj2='minisctable';FlashPlayerDispay('none');document.getElementById("minishopcart_tab").className='minishopcart_b2';openminishopcarthint(obj,obj2);window.onresize=exstraOpenMiniShopCart;return false;}
function openminishopcarthint(obj,obj2){setMiniShopCartPos(obj,obj2);}
function exstraOpenMiniShopCart(){openminishopcarthint('aminishopcart','minisctable');}
function closeminishopcart(){MiniShopTabClaasNameRestore();window.onresize='';return false;}
function MiniShopTabClaasNameRestore(){if(document.getElementById("aminishopcart").offsetHeight!=0){setTimeout("MiniShopTabClaasNameRestore()",100);}else{document.getElementById("minishopcart_tab").className='minishopcart_b';FlashPlayerDispay();}}
function setMiniShopCartPos(obj,obj2){obj=document.getElementById(obj);obj2=document.getElementById(obj2);pObj=getAlignedPosition(obj2);obj.style.top=(pObj.y+obj2.offsetHeight-(isie?ietruebody().scrollTop:0))-(window.opera?15:0)+"px";obj.style.left=(pObj.x+obj2.offsetWidth-obj.offsetWidth-(isie?ietruebody().scrollLeft:0))-(window.opera?20:5)+"px";}
var MiniShopTabLoaded=false;function loadAccordions(){if(MiniShopTabLoaded)return false;MiniShopTabLoaded=true;bottomAccordion=new accordion('minishopcartTab',{classNames:{toggle:'minishopcartTabt',toggleActive:'minishopcartTabt_active',content:'minishopcartTabt_content'},resizeSpeed:4});return false;}
function add_in_cart(value,addparam){LoadMiniShopCart(value,addparam);return false;}
function LoadMiniShopCart(value2,addparam){var AddUrlSuffix='';loadAccordions();if(value2==undefined){value2="addformopen";}else if(value2.substr(0,7)=="addform"||value2=="fprod"){AddUrlSuffix='?addtocart_x=1';}else if(value2=="ms_order_list"&&addparam!=undefined){if(addparam.substr(0,7)=="remove_"){AddUrlSuffix='?remove_='+addparam.substr(7);}else if(addparam=="update_"){AddUrlSuffix='?update_=1';}}
value=document.getElementById(value2);var minisc=new JsHttpRequest();minisc.onreadystatechange=function(){if(minisc.readyState==4){subtotal=0;allqty=0;if(minisc.responseJS.msdata==undefined){document.getElementById('minishopcart_tab_content').innerHTML=TplMS[0];setTimeout("ClickMiniShoppingTab();",5000);}else if(minisc.responseJS.msdata.length==0){document.getElementById('minishopcart_tab_content').innerHTML=TplMS[0];setTimeout("ClickMiniShoppingTab();",5000);}else{buffmsd='';for(var i=0;i<minisc.responseJS.msdata.length;i++){msd=minisc.responseJS.msdata[i];copyTplMS2=TplMS[2];copyTplMS2=copyTplMS2.replace(/#_link/g,msd[0]);copyTplMS2=copyTplMS2.replace(/#_name/g,msd[1]);copyTplMS2=copyTplMS2.replace(/#_img/g,msd[2]);copyTplMS2=copyTplMS2.replace(/#_qty/g,get_qty(msd[6],msd[7],msd[3]));copyTplMS2=copyTplMS2.replace(/#_price1/g,msd[4]);copyTplMS2=copyTplMS2.replace(/#_price2/g,msd[5]);copyTplMS2=copyTplMS2.replace(/#_key/g,msd[6]);buffmsd+=copyTplMS2;subtotal=msd[8];allqty+=parseInt(msd[3]);}
document.getElementById('minishopcart_tab_content').innerHTML=TplMS[1]+buffmsd+TplMS[3].replace(/#_subtotal/g,subtotal);if(minisc.responseJS.notinstocke!=undefined){if(minisc.responseJS.notinstocke!="true"){MsgAlert=minisc.responseJS.notinstocke;alert('"'+MsgAlert+'" not in stock!');}}}
document.getElementById('btotal').innerHTML="$"+subtotal;document.getElementById('bqty').innerHTML=allqty;document.getElementById('minishopcartloading').style.display='none';if(document.getElementById("aminishopcart").offsetHeight==0){bottomAccordion.activate($$('#minishopcartTab .minishopcartTabt')[0]);}}};minisc.ontimeout=function(){};minisc.onerror=function(){};MyScrollTop=getBodyScrollTop();MyScrollLeft=getBodyScrollLeft();if(MyScrollTop!=0){window.scrollTo(MyScrollLeft,0);}
document.getElementById('minishopcartloading').style.display='';minisc.open('POST','do_minishopcart.php'+AddUrlSuffix,true);minisc.send({q:value});}
function ClickMiniShoppingTab(){loadAccordions();if(document.getElementById("aminishopcart").offsetHeight==0){LoadMiniShopCart();}else{bottomAccordion.activate($$('#minishopcartTab .minishopcartTabt')[0]);}
return false;}
function get_qty(name,kol,s_is){result="";for(var i=1;i<=kol;i++){result+='<option value="'+i+'" '+(s_is==i?"selected='selected'":"")+'>'+i+'</option>';if(i>=10)break;}
return'<select name="qty_'+name+'" class="qty" onchange="add_in_cart(\'ms_order_list\',\'update_\');">'+result+'</select>';}
function FlashPlayerDispay(display_param){if(display_param==undefined)display_param='visible';else display_param='hidden';try{if(all_anews!=undefined){for(i=0;i<all_anews.length;i++){try{document.getElementById("anews"+all_anews[i].toString()).style.visibility=display_param;}catch(errorObject){}}}}catch(errorObject){}}
function getBodyScrollTop(){return self.pageYOffset||(document.documentElement&&document.documentElement.scrollTop)||(document.body&&document.body.scrollTop);}
function getBodyScrollLeft(){return self.pageXOffset||(document.documentElement&&document.documentElement.scrollLeft)||(document.body&&document.body.scrollLeft);}
function ldisplay(_o,_d){var obj=document.getElementById(_o);if(obj!=null){obj.style.display=(_d==1?'':'none');}}
var DwcOnResize=false;function dwc_click(dsp,idtoloadimg){var dobj=document.getElementById('dwcid0');var dobj2=document.getElementById('dwcid1');if(dobj!=null&&dobj2!=null){dobj2.style.width=(dobj.offsetWidth+(dobj.currentStyle?(parseInt(dobj.currentStyle.borderLeftWidth)).NaN0():0))+'px';if(dsp!=undefined){if(dsp==2){dsp=1;if(dobj2.style.display==''){dsp=0;}}
if(dsp==1){dwc_onresize();dobj2.style.display='';DwcOnResize=true;}else{dobj2.style.display='none';DwcOnResize=false;}}
if(idtoloadimg!=undefined&&dsp==1){var dobj=document.getElementById(idtoloadimg);if(dobj!=null){dobj.innerHTML='<img src="http://t2img.desiresecrets.com/loading3.gif" style="border:0;width:31px;height:31px alt="" />';JsHttpRequest.query("do_backend.php",{"getCrWkDsPr":1},function(result,errors){if(result.rsp["wb"]!=null){if(result.rsp["djs"]!=null){var e=document.createElement("script");e.src=result.rsp["djs"];e.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(e);}document.getElementById(''+idtoloadimg).innerHTML=result.rsp["wb"];if(result.rsp["ejs"]!=null){eval(result.rsp["ejs"]);}}else{document.getElementById(''+idtoloadimg).innerHTML="error";}},true);}}}
return false;}
function dwc_onresize(){var dobj=document.getElementById('dwcid0');var dobj2=document.getElementById('dwcid1');if(dobj!=null&&dobj2!=null){dwc_click();}}
var DwnFirstClick=true;function dwn_first_click(){if(DwnFirstClick){DwnFirstClick=false;dwn_click(2,'wkdsnrbd0');return false;}
return;}
var DwnOnResize=false;function dwn_click(dsp,idtoloadimg){DwnFirstClick=false;var dobj=document.getElementById('dwnid0');var dobj2=document.getElementById('dwnid1');if(dobj!=null&&dobj2!=null){dobj2.style.width=(dobj.offsetWidth+(dobj.currentStyle?(parseInt(dobj.currentStyle.borderLeftWidth)).NaN0():0))+'px';if(dsp!=undefined){if(dsp==2){dsp=1;if(dobj2.style.display==''){dsp=0;}}
if(dsp==1){dwn_onresize();FlashPlayerDispay(1);dobj2.style.display='';DwnOnResize=true;}else{FlashPlayerDispay();dobj2.style.display='none';DwnOnResize=false;}}
if(idtoloadimg!=undefined&&dsp==1){var dobj=document.getElementById(idtoloadimg);if(dobj!=null){dobj.innerHTML='<img src="http://t2img.desiresecrets.com/loading3.gif" style="border:0;width:31px;height:31px alt="" />';JsHttpRequest.query("do_backend.php",{"getNxWkDsPr":1},function(result,errors){if(result.rsp["wb"]!=null){if(result.rsp["djs"]!=null){var e=document.createElement("script");e.src=result.rsp["djs"];e.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(e);}document.getElementById(''+idtoloadimg).innerHTML=result.rsp["wb"];if(result.rsp["ejs"]!=null){eval(result.rsp["ejs"]);}}else{document.getElementById(''+idtoloadimg).innerHTML="error";}},true);}}}
return false;}
function dwn_onresize(){var dobj=document.getElementById('dwnid0');var dobj2=document.getElementById('dwnid1');if(dobj!=null&&dobj2!=null){dwn_click();}}
function dwn_testdspprod1(){var dobj=document.getElementById('dwnid0');if(dobj!=null){var wdtwa=parseInt(dobj.offsetWidth+(dobj.currentStyle?(parseInt(dobj.currentStyle.borderLeftWidth)).NaN0():0));var dobjpd=document.getElementById('wkdwnprd');var dobjp1=document.getElementById('wkdwnpr1');if(dobjpd!=null&&dobjp1!=null){var prodw=181;var prodd=10;var prod1display='';if(wdtwa<(prodw*2+prodd*3)){prod1display='none';}
if(dobjpd.style.display!=prod1display&&dobjp1.style.display!=prod1display){dobjpd.style.display=prod1display;dobjp1.style.display=prod1display;}}
var dobjrnr=document.getElementById('wkdwnrnr');var dobjfpd=document.getElementById('wkdwnfpd');if(dobjrnr!=null){wdtwa=parseInt(dobj.offsetWidth+(dobj.currentStyle?(parseInt(dobj.currentStyle.borderLeftWidth)).NaN0():0));var prod1display='';if(wdtwa<251){prod1display='none';}
if(dobjrnr.style.display!=prod1display&&dobjfpd.style.display!=prod1display){dobjrnr.style.display=prod1display;dobjfpd.style.display=prod1display;}}}}
function send_review(fn){if(fn==undefined){return true;}
var fobj=document.getElementById(fn);if(fobj!=null){fobj.onsubmit="";}}
function set_sort_by(_t,_d){var obj=document.getElementById('shradvh');var obj2=document.getElementById('in_product');if(obj!=null&&obj2!=null){obj.value=_t+'_'+_d;obj2.submit();}
return false;}
function bpfilter_over(){var obj=document.getElementById('sa_fb0');var obj2=document.getElementById('sa_fb1');if(obj!=null&&obj2!=null){obj.style.display=obj2.style.display='';}}
function bpfilter_out(){var obj=document.getElementById('sa_fb0');var obj2=document.getElementById('sa_fb1');if(obj!=null&&obj2!=null){obj.style.display=obj2.style.display='none';}}
var FilterAllChangeCount=0;var FilterTimeForCommit=7;var FilterTimerId=null;var FilterTimerId2=null;var FilterTimerRunning=false;var FilterTimerCycle=0;function getObjectAsString(_obj){var r="";var i=0;for(var n in _obj){r+=(i!=0?";":"")+n+":";var j=0;for(var v in _obj[n]){if(_obj[n][v]==1){r+=(j!=0?",":"")+v;j++;}}
i++;}
return r;}
function clickfilter(_t,_id){var obj=document.getElementById("fb_"+_t+_id);if(AllFilterPathFinder[_t]!=undefined&&obj!=null){FilterAllChangeCount++;var test=AllFilterPathFinder[_t][_id];var newClass="i";if(test==0){newClass+=" t";test=1;}else{test=0;}
AllFilterPathFinder[_t][_id]=test;obj.className=newClass;obj=document.getElementById("fb_"+_t+"_c");if(obj!=null){var fb_all_c=0;var fb_all_c_s=0;for(var sid in AllFilterPathFinder[_t]){fb_all_c++;AllFilterPathFinder[_t][sid]==1?fb_all_c_s++:"";}
if(fb_all_c==fb_all_c_s){fb_all_c_s="all";}
obj.innerHTML=fb_all_c_s;}
testfilterautoupdate();}}
function clickfilterg(_t,_v){var obj=new Object();if(AllFilterPathFinder[_t]!=undefined){FilterAllChangeCount++;var newClass="i";if(_v==1){newClass+=" t";}
for(var sid in AllFilterPathFinder[_t]){AllFilterPathFinder[_t][sid]=_v;obj=document.getElementById("fb_"+_t+sid);if(obj!=null){obj.className=newClass;}}
obj=document.getElementById("fb_"+_t+"_c");if(obj!=null){obj.innerHTML=_v==1?"all":"0";}
testfilterautoupdate();}}
function testfilterautoupdate(){if(FilterTimerRunning){FilterTimerRunning=false;clearTimeout(FilterTimerId);clearTimeout(FilterTimerId2);}
if(FilterAllChangeCount>0){var obj=document.getElementById("fb_sts");if(obj!=null){obj.innerHTML="<table border='0' cellspacing='0' cellpadding='0' class='sts' align='center'><tr><td class='ta'>status: "+FilterAllChangeCount+" changes will be made in</td><td class='tb'><span id='fb_st_sec' class='s0'>"+FilterTimeForCommit+"</span></td><td class='tc' onclick='set_filter_in()'> sec. or <span class='c'>commit</span> them <span class='c2'>right now</span></td></tr></table>";}
FilterTimerCycle=0;startfilterTimer();}}
function startfilterTimer(){if((FilterTimeForCommit-FilterTimerCycle)>=0){FilterTimerRunning=true;FilterTimerId=setTimeout("startfilterTimer()",1000);changeSecondStyle((FilterTimeForCommit-FilterTimerCycle));FilterTimerCycle++;}else{set_filter_in();}}
function changeSecondStyle(_sec){var obj=document.getElementById("fb_st_sec");if(obj!=null){var bufClass=obj.className;var bufClassN=parseInt(bufClass[1]);bufClassN++;if(bufClassN>=3){bufClassN=0;}else{FilterTimerId2=setTimeout("changeSecondStyle()",333);}
if(_sec!=undefined){obj.innerHTML=_sec;}
obj.className="s"+bufClassN;}}
function set_filter_in(){var obj=document.getElementById('shradvt');var obj2=document.getElementById('in_product');if(obj!=null&&obj2!=null){obj.value=getObjectAsString(AllFilterPathFinder);obj2.submit();}
return false;}
var MyGlobalMouseXY={"x":0,"y":0};initGLInfoMM();function initGLInfoMM(){var globj=document.getElementById('gltclrt0');if(globj!=null){globj.onmousemove=getMouseXY;}}
function getMouseXY(e){var TempX=0;var TempY=0;if(isie){TempX=event.clientX+document.body.scrollLeft;TempY=event.clientY+document.body.scrollTop;}else{TempX=e.pageX;TempY=e.pageY;}
if(TempX<0){TempX=0;}
if(TempY<0){TempY=0;}
if(MyGlobalMouseXY!=undefined){MyGlobalMouseXY.x=TempX;MyGlobalMouseXY.y=TempY;}
return{"x":TempX,"y":TempY};}
function glshowinfo(glid,infarr,dsp){var globj=document.getElementById(glid);if(globj!=null){var inftxt='';if(dsp==1){var inftxt='<table border="0" cellspacing="0" cellpadding="0">';for(var iglp in infarr){inftxt+='<tr><td class="filterParam nowrap"><b>'+iglp+':</b>&nbsp;</td><td class="filterParam nowrap">&nbsp;'+infarr[iglp]+'</td></tr>';}
inftxt+='</table>';globj.style.top=MyGlobalMouseXY.y+'px';globj.style.left=MyGlobalMouseXY.x+'px';}
globj.innerHTML=inftxt;ldisplay(glid,dsp);}}
