var img_path="data/images/";/*#######################################################################################*\ ########################################################################################### ### NOTICE THIS FILE IS 100% Property Of Mohamed Mahmoud Shehab ### ### And No One Is Ever Allowed ### ### TO USE IT Or Any Part Of It In / With Any Website Unless Under license ... ### ### And Notice This Is Protected By The LAW ### ### shehabic@gmail.com Contact Me For more Info ### ########################################################################################### \*#######################################################################################*/ var tx=""; var hide_all_cats; var hide_all_strs; function $(id){ var obj = null; if(document.getElementById){ obj = document.getElementById(id); }else if(document.all){ obj = document.all[id]; } return obj; } function show_stores() { hide_cats(0); all_pos=returnPos("all_stores"); $("all_stores_layer").style.left=(all_pos.x-2)+"px"; $("all_stores_layer").style.top=(parseInt(all_pos.y)+29)+"px"; $("all_stores_layer").style.visibility="visible"; clearTimeout(hide_all_strs); } function hide_strs(after_amount){ if(after_amount==0) { $("all_stores_layer").style.visibility="hidden"; clearTimeout(hide_all_strs); } else{ hide_all_strs=setTimeout("hide_strs("+(after_amount-1)+")",100); } } function left_menu_on_action(no,cond){ if(cond==1){ $("left_static_border_"+no).style.color="#FFFFFF"; $("left_static_border_"+no).style.background="#BFD6E7"; } else{ if($("all_static_place_"+no).className!="left_items_over"){ $("left_static_border_"+no).style.color="#5B595B"; $("left_static_border_"+no).style.background="#FFFFFF"; } else{ $("left_static_border_"+no).style.color="#0092D4"; $("left_static_border_"+no).style.background="#FFFFFF"; } } } function show_categories(li) { //hide_strs(0); var layers=document.getElementById('layers').value; var layers_arr=layers.split(','); /*var left_layer=document.getElementById('left_layers').value; var left_layer_arr=left_layer.split(','); for(var i=0;i-1 && $(anc[i].id).className!="left_items_over"){ $(anc[i].id).style.color="#5B595B"; $(anc[i].id).style.background=""; } else if(anc[i].id.indexOf("all_place")>-1 && $(anc[i].id).className=="left_items_over"){ $(anc[i].id).style.color="#0092D4"; $(anc[i].id).style.background=""; } }*/ var div_bottom=document.getElementsByTagName("div"); for(var z=0;z-1){ var anchor_i=div_bottom[z].id.split("_"); if($("all_place_"+anchor_i[anchor_i.length-1]).className!="left_items_over"){ $(div_bottom[z].id).style.background="#FFFFFF"; $(div_bottom[z].id).style.color="#5B595B"; } else{ $(div_bottom[z].id).style.background="#FFFFFF"; $(div_bottom[z].id).style.color="#0092D4"; } } } for(var j=0;j"+$("rect").style.width+"<-->"+$("rect").style.height); $("rect").style.visibility="visible"; alertSize(); getScrollXY(); wid=parseInt($("rect").style.width); hei=parseInt($("rect").style.height); $("rect").style.width=(wid*1.25)+"px"; $("rect").style.height=(hei*1.25)+"px"; $("rect").style.left=(parseInt(myWidth)/2)+scrOfX-parseInt(wid/2)+"px"; $("rect").style.top=(parseInt(myHeight)/2)+scrOfY-parseInt(hei/2)+"px"; xtime=setTimeout("resize_rect('"+layerNAME+"',"+maxWIDTH+")",10); } else { clearTimeout(xtime); $("rect").style.visibility="hidden"; $(layerNAME).style.left=parseInt($("rect").style.left)+"px"; $(layerNAME).style.top=parseInt($("rect").style.top)+"px"; $(layerNAME).style.visibility="visible"; if($("ob")) { $("ob").style.visibility="hidden"; } } } function setCookie(name, value, expires, path, domain, secure) { document.cookie= name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } //-------------------------------------------------------------------------------------------- function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return ""; } else { begin += 2; } var end = document.cookie.indexOf(";", begin); if (end == -1) { end = dc.length; } return unescape(dc.substring(begin + prefix.length, end)); } var z=new Array(); var thespeed=10; function hide_now(obj_here) { x=$(obj_here); ht=x.offsetHeight; thespeed=parseInt(parseInt(ht)/10)+1; $(obj_here).style.height=parseInt(ht)+"px"; decrease(obj_here); } function show_now(obj_here,extra) { if(!extra)extra=0; x=$(obj_here); x.style.display="block"; x.style.overflow="visible"; x.style.height=""; ht=x.offsetHeight; thespeed=parseInt(parseInt(ht)/10)+2; x.style.overflow="hidden"; x.style.height="0px"; x.style.display="block"; increase(ht,obj_here,z.length,extra); } function decrease(obj_here,IndexOFz,extraOPTION){ if(!extraOPTION)extraOPTION=0; x.style.overflow='hidden'; x=$(obj_here); ht=x.style.height; if (parseInt(ht)>(thespeed-1)) { ht=parseInt(ht)-thespeed; if(extraOPTION==1){ x.style.top=(parseInt(x.style.top)+thespeed)+"px"; } x.style.height=parseInt(ht)+"px"; if(!IndexOFz){ var IndexOFz=z.length; } z[IndexOFz]=setTimeout("decrease('"+obj_here+"',"+IndexOFz+","+extraOPTION+")",30); } else { x.style.height=0+"px"; x.style.display="none"; clearTimeout(z[IndexOFz]); } } function increase(hx,obj_here,IndexOFz,extraOPTION){ IndexOFz=0; if(!extraOPTION)extraOPTION=0; var x=$(obj_here); x.style.overflow='hidden'; ht=x.style.height; if (parseInt(ht)<(parseInt(hx)-(thespeed-1))) { ht=parseInt(ht)+thespeed; x.style.height=parseInt(ht)+"px"; z[IndexOFz]=setTimeout("increase("+hx+",'"+obj_here+"',"+IndexOFz+","+extraOPTION+")",30); if(extraOPTION==1){ x.style.top=(parseInt(x.style.top)-thespeed)+"px"; } } else { x.style.height=""; x.style.overflow='visible'; clearTimeout(z[IndexOFz]); x.style.visibility='visible'; } } state=new Array(); function HL(x) { for(i=1;i<=x;i++) { z=document.getElementById("s"+i+""); z.src='images/staron.gif'; } } function DL() { for(i=1;i<=5;i++) { z=document.getElementById("s"+i+""); if (state[i]!=1)z.src='images/staroff.gif'; else if (state[i]==1)z.src='images/staron2.gif'; } } function vote(x,PID_HERE) { if(x<5)for(i=x+1;i<=5;i++){ state[i]=0; } for(i=1;i<=x;i++) { state[i]=1; z=document.getElementById("s"+i+""); z.src='images/staron2.gif'; } sR("modules/quick.php?op=rate&product="+PID_HERE+"&rate="+x+"","","","the_rating"); } function rotate_image(direction){ if(direction==1){ var positions=$("state_image").innerHTML; var positions2=positions.split('/'); var curr_image=parseInt(positions2[0]); var list_images=$("im_list").value; var the_product_id=$('product_id').value; var current_image=list_images.split(","); if(curr_image< current_image.length){ curr_image++; }else { curr_image=1; } $("im_"+the_product_id).src=img_path+current_image[curr_image-1]; } else if(direction==-1){ var positions=$("state_image").innerHTML; var positions2=positions.split('/'); var curr_image=parseInt(positions2[0]); var list_images=$("im_list").value; var the_product_id=$('product_id').value; var current_image=list_images.split(","); if(curr_image>1){ curr_image--; }else { curr_image=current_image.length; } $("im_"+the_product_id).src=img_path+current_image[curr_image-1]; } $("state_image").innerHTML=curr_image+"/"+current_image.length; } function scrollToBottom(el, force) { var bottom = el.scrollHeight - el.clientHeight; if (el.scrollTop == arguments.callee.scrollAtBottom || force === true) { el.scrollTop = bottom; arguments.callee.scrollAtBottom = bottom; } } function wrapText(msg_content,MAX_WIDTH) { var final_msg=""; var this_line=""; for(i=0;i< msg_content.length;i++){ $("text_TD").innerHTML=$("text_TD").innerHTML+msg_content.charAt(i); if(parseInt( $("text_TABLE").offsetWidth ) < MAX_WIDTH) { this_line=this_line+msg_content.charAt(i); }else{ final_msg=final_msg+this_line+" "; this_line=msg_content.charAt(i); $("text_TD").innerHTML=msg_content.charAt(i); } } if(this_line!="")final_msg=final_msg+this_line+" "; return final_msg; } var focused=false; function alignPos(ITEM_1,ITEM_2,OFFX,OFFY) { if(!OFFX)OFFX=0; if(!OFFY)OFFY=0; var COORDS1=returnPos(ITEM_1); document.getElementById(ITEM_2).left=(parseInt(COORDS1.x)+parseInt(OFFX))+"px"; document.getElementById(ITEM_2).left=(parseInt(COORDS1.y)+parseInt(OFFY))+"px"; } function load_shipping(FLD_NAME){ var SHIP=$(FLD_NAME).value; var ALL=SHIP.split("[+]"); for(i=0;i< ALL.length;i++) { SPLITS=ALL[i].split("==="); if($(SPLITS[0])) $(SPLITS[0]).value=SPLITS[1]; } } function special_display(SPECIAL_ITEM){ if(getobjbyid(SPECIAL_ITEM).style.overflow=="visible"){ return; } show_now(SPECIAL_ITEM); }