var myGlobalHandlers={onCreate:function(){if(window.innerHeight&&window.scrollMaxY){xScroll=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}if($('loading_layer')){}},onComplete:function(request,transport){new Effect.BlindUp('loading_layer',{duration:1});if(transport.responseText=='OFFLINE'){LoadPage('http://amozeshi.com/users/loginform.php?AJAXED=1','center');LoadPage('http://amozeshi.com/blocks/members_box.php?AJAXED=1','users_box');return false;}}};Ajax.Responders.register(myGlobalHandlers);GetLoading=function(){return'<div align="center" dir="rtl" style="font-size:11px"><b>&#1604;&#1591;&#1601;&#1575; &#1605;&#1606;&#1578;&#1592;&#1585; &#1576;&#1605;&#1575;&#1574;&#1740;&#1583;...</b><br><img src="http://amozeshi.com/images/progress.gif" border="0"></div>';};changeStyle=function(id,status){if(status==1){id.border='solid 1pt red';id.background='#ffffff url(http://amozeshi.com/images/warning.gif) no-repeat  left';}else{id.border='#c0c0c0 1px solid';id.className='input';id.background='#ffffff url(http://amozeshi.com/images/ok.gif) no-repeat left';}};changeBorder=function(place,color,focos,msg,to){if(color&&color.length>0){place.style.border='solid 1px '+color;}else{place.style.border='solid 0px';}if(focos){focos.focus();}if(msg&&to){to.innerHTML=msg;}};LoadPage=function(url,idl,effect){var pars='';$(idl).innerHTML=GetLoading();var myAjax=new Ajax.Updater(idl,url,{method:'get',parameters:pars,evalScripts:true,onFailure:function(t){alert('Error in internet Connection: '+t.status+' -- '+t.statusText);},onComplete:function(t){if(document.getElementById('navig')&&document.getElementById('navig').innerHTML.length>0&&idl=='center'){$('nav-title').innerHTML=$('navig').innerHTML;$('navig').innerHTML='';$('navig').remove();}if(effect){var effects='new Effect.'+effect+'(\''+idl+'\')';eval(effects);}}});};LoadPage2=function(url,idl,effect){var pars='';var myAjax=new Ajax.Updater(idl,url,{method:'get',parameters:pars,evalScripts:true,onFailure:function(t){alert('Error in internet Connection: '+t.status+' -- '+t.statusText);},onComplete:function(t){if(document.getElementById('navig')&&document.getElementById('navig').innerHTML.length>0&&idl=='center'){$('nav-title').innerHTML=$('navig').innerHTML;$('navig').innerHTML='';$('navig').remove();}if(effect){var effects='new Effect.'+effect+'(\''+idl+'\')';eval(effects);}}});};sub_com=function(){var poststr='';for(var k=0;k<CF.elements.length;k++){poststr+='&'+CF.elements[k].name+'='+encodeURI(CF.elements[k].value);}var Proccess_comnt={method:'post',postBody:'AJAXED=1'+poststr,onSuccess:function(t){},on404:function(t){alert('Error 404: location "'+t.statusText+'" was not found.');},onFailure:function(t){alert('Error '+t.status+' -- '+t.statusText);}};comnt_win.setDestroyOnClose();comnt_win.getContent().innerHTML='<center>Please Wait Loading...</center>';comnt_win.setAjaxContent('http://amozeshi.com/comments.php',Proccess_comnt,true,true);return false;};show_com=function(url){var Proccess_comnt={method:'get',parameters:'AJAXED=1',evalScripts:true,onSuccess:function(t){},on404:function(t){alert('Error 404: location "'+t.statusText+'" was not found.');},onFailure:function(t){alert('Error '+t.status+' -- '+t.statusText);}};if(!$('comnt_win')){comnt_win=new Window('comnt'+Math.round(100000*Math.random()),{className:"alphacube",title:"Comments",top:70,left:100,width:450,height:350,resizable:true,showEffect:Effect.BlindDown,hideEffect:Effect.SwitchOff,showEffectOptions:{duration:1}});}comnt_win.setDestroyOnClose();comnt_win.getContent().innerHTML='<center>Please Wait Loading...</center>';comnt_win.setAjaxContent(url,Proccess_comnt,true,true);return false;};Load_img=function(url){if(!$('gallery_im_win')){gallery_im_win=new Window('gallery'+Math.round(100000*Math.random()),{className:"alphacube",title:"View image",top:70,left:100,width:500,height:500,resizable:true,showEffect:Effect.BlindDown,hideEffect:Effect.SwitchOff,showEffectOptions:{duration:1}});}gallery_im_win.setDestroyOnClose();gallery_im_win.getContent().innerHTML='<center><img src="'+url+'" border="0"></center>';gallery_im_win.showCenter(true);};sub_com2=function(){var poststr='';for(var k=0;k<CF.elements.length;k++){poststr+='&'+CF.elements[k].name+'='+encodeURI(CF.elements[k].value);}var url='';url='http://amozeshi.com/show_product.php?op=listcomment&AJAXED=1&id='+CF.fid.value;var Proccess_comnt={method:'post',postBody:'AJAXED=1'+poststr,onSuccess:function(t){LoadPage(url,'Commlist');},on404:function(t){alert('Error 404: location "'+t.statusText+'" was not found.');},onFailure:function(t){alert('Error '+t.status+' -- '+t.statusText);}};Comm.innerHTML=GetLoading();var myAjax=new Ajax.Updater('Comm','comments.php',Proccess_comnt);return false;};sub_qa=function(){var poststr='';for(var k=0;k<CF.elements.length;k++){poststr+='&'+CF.elements[k].name+'='+encodeURI(CF.elements[k].value);}var Proccess_comnt={method:'post',postBody:'AJAXED=1'+poststr,onSuccess:function(t){},on404:function(t){alert('Error 404: location "'+t.statusText+'" was not found.');},onFailure:function(t){alert('Error '+t.status+' -- '+t.statusText);}};center.innerHTML='<div align="center" dir="ltr" style="font-size:11px"><b>Please Wait Loading... </b><br><img src="http://amozeshi.com/images/progress.gif" border="0"></div>';var myAjax=new Ajax.Updater('center','qa.php',Proccess_comnt);return false;};Search_sit=function(key){var poststr='';poststr='key='+encodeURI(key);var Proccess_Srch={method:'post',evalScripts:true,postBody:'AJAXED=1&'+poststr+'&rnd='+Math.round(100000*Math.random()),onComplete:function(t){if(document.getElementById('navig')&&document.getElementById('navig').innerHTML.length>0){$('nav-title').innerHTML=$('navig').innerHTML;$('navig').innerHTML='';$('navig').remove();}},on404:function(t){alert('Error 404: location "'+t.statusText+'" was not found.');},onFailure:function(t){alert('Error '+t.status+' -- '+t.statusText);}};$('center').innerHTML='<div align="center" dir="ltr" style="font-size:11px"><b>Please Wait Loading... </b><br><img src="http://amozeshi.com/images/progress1.gif" border="0"></div>';var myAjax=new Ajax.Updater('center','http://amozeshi.com/search.php',Proccess_Srch);return false;};framePrint=function framePrint(whichFrame,id){parent[whichFrame].designMode='on';parent[whichFrame].document.body.style.direction='rtl';parent[whichFrame].document.body.style.fontSize='11px';parent[whichFrame].document.body.style.fontFamily='tahoma';parent[whichFrame].document.body.innerHTML=document.getElementById(id).innerHTML;parent[whichFrame].focus();parent[whichFrame].print();};detectBrowser=function(){var browser=navigator.appName;var b_version=navigator.appVersion;var version=parseFloat(b_version);if((browser=="Microsoft Internet Explorer")&&(version>=4)){return 1;}else{return 0;}};syswork.style.display='none';
