
function CloseMsg(){var mb=document.getElementById('vscreen');mb.style.visibility='hidden';}
function jcreate(url,Container,finish){var http;try{http=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http=new ActiveXObject("Microsoft.XMLHTTP");}catch(err){http=null;}}
if(!http&&typeof XMLHttpRequest!="undefined")
http=new XMLHttpRequest();if(!http)Container.innerHTML='<center><b>لطفااز مرورگرهای دیگری مانند FireFox یا Internet Explorer استفاده نمایید.</b></center>';else{http.onreadystatechange=function(){if(http.readyState==4)if(http.status==200){Container.innerHTML=http.responseText;if(finish)finish();}
else Container.innerHTML='<b>خطا : '+http.statusText+'<br>لطفا مجددا سعی کنیذ.</b>';}
http.open('GET',url,true);http.send(null);}}
function toggle(e){e.onload='';var d=e.parentNode;if(d.style.overflow==''){d.style.height='23px';d.style.overflow='hidden';e.src="http://media.rayanak.com/photos/moreinfo.gif";}
else{d.style.height='';d.style.overflow='';e.src="http://media.rayanak.com/photos/lessinfo.gif"}
var a=d.getElementsByTagName('IMG');for(i=0;i<a.length;i++){if(a[i].id=='ges')
a[i].src=e.src;}}
function showbasket(){var d=new Date();jcreate('/basket.php?t='+d.getTime(),document.getElementById('mini_basket'),'');}
function add2card(vendor,id){var ms=document.getElementById('vscreen');var mt=document.getElementById('MsgText');mt.innerHTML='<b>لطفا چند لحظه صبر کنید... </b><img border="0" src="http://media.rayanak.com/photos/waitIcons.gif" width="16" height="16">';ms.style.visibility='visible';jcreate('/minicard.php?act=add&vendors='+vendor+'&id='+id,mt,showbasket);return false;}