function init_accnums(){
	var divs,html='',timer,i,hover=0;	

	var show=function(newhover){
		var info=order.info.bank[newhover];
		divs[hover].className='';
		divs[newhover].className='hover';
		$('accnums').innerHTML='<div><b>بانک '+info.name+'</b><div><p>شماره حساب: </p><i>'+info.num+'</i></div>'+
                '<div><p>شماره کارت: </p><i>'+info.card+'</i></div><em>'+info.aname+'</em></div>';
		hover=newhover;
	};
	            	

	for(i=0;i<order.info.bank.length;i+=1){
		html+='<div'+(i==0?' class="hover"':'')+' style="background-image:url(img/'+order.info.bank[i].pica+')" title="بانک '+order.info.bank[i].name+'" num="'+i+'">&nbsp;</div>';
	};
	$('accnumslogo').innerHTML=html;
	divs=$('accnumslogo').getElementsByTagName('div');
	
	for(i=0;i<divs.length;i+=1){
		divs[i].num=i;
		divs[i].onmouseover=function(){
			clearInterval(timer);
			show(this.num);
		};
		divs[i].onmouseout=function(){
			timer=setInterval(function(){show(hover+1<divs.length?hover+1:0)},2000);
		};
	};
	
	divs[0].onmouseout();
	show(0);
};

function init_picsshow(){
	var pics=$('imgslide').getElementsByTagName('a');
	var fade=0,fadestart,int=10000,timer,time,isplay=true;
	var index=0,last,newi;
	

	var fadefunc,shownext,IEVer=window.navigator.userAgent.match(/MSIE\s*([\d.]+)/i);
	fadefunc=IEVer?(parseFloat(IEVer[1])<6?false:true):true;
	if(fadefunc){
		fadefunc=function(){
			time=new Date().getTime();
			if(time-fadestart<150){
				setopacity(newi,Math.round((time-fadestart)/1.5));
				setTimeout(fadefunc,10);
			}else{
				setopacity(newi,100);
				last.style.visibility='hidden';
				setopacity(last,0);
				if(isplay) timer=setTimeout(shownext,int);
			}
		};
		
		shownext=function(){
			last=pics[index];
			index=(index+1)<pics.length?(index+1):0;
			newi=pics[index];
			setopacity(newi,0);
			newi.style.zIndex=4;
			newi.style.visibility='visible';
			last.style.zIndex=3;
			fadestart=new Date().getTime();
			timer=setTimeout(fadefunc,10);
		};
		
		if(pics.length>1){
			for(var i=0;i<pics.length;i+=1){
				pics[i].onmouseover=function(){
					isplay=false;
					clearTimeout(timer);
				};
				pics[i].onmouseout=function(){
					isplay=true;
					timer=setTimeout(shownext,int);
				};
				setopacity(pics[i],0);
				pics[i].style.zIndex=2;
				pics[i].style.visibility='hidden';
			};
			pics[0].style.zIndex=3;
			pics[0].style.visibility='visible';
			setopacity(pics[0],100);
			timer=setTimeout(shownext,int);
		};
	}else{
		shownext=function(){
			last=pics[index];
			index=(index+1)<pics.length?(index+1):0;
			newi=pics[index];
			newi.style.zIndex=4;
			newi.style.visibility='visible';
			last.style.zIndex=3;
			last.style.visibility='hidden';
			if(isplay) timer=setTimeout(shownext,int);
		};
		
		if(pics.length>1){
			for(var i=0;i<pics.length;i+=1){
				pics[i].onmouseover=function(){
					isplay=false;
					clearTimeout(timer);
				};
				pics[i].onmouseout=function(){
					isplay=true;
					timer=setTimeout(shownext,int);
				};
				pics[i].style.zIndex=2;
				pics[i].style.visibility='hidden';
			};
			pics[0].style.zIndex=3;
			pics[0].style.visibility='visible';
			timer=setTimeout(shownext,int)
		}
	}
	

};

if(!window.location.toString().match(/^(https?:\/?\/?)?[^\/]*(pasargadtech\.com)/ig)){
	document.writeln('<style>.window{position:relative!important}\nhtml,body{overflow:auto!important}</style>');
};

