
var rich_link='http://1link.ru/c.php?site_id=42769&p=71&sub_id=0';
var rich_file='http://on2you.ru/rich/parapa1.swf';

function Get_Cookie(name){var start=document.cookie.indexOf(name+"=");var len=start+name.length+1;if((!start)&&(name!=document.cookie.substring(0,name.length))){return null;}if(start==-1)return null;var end=document.cookie.indexOf(";",len);if(end==-1)end=document.cookie.length;return unescape(document.cookie.substring(len,end));}
function Set_Cookie(name,value,expires,path,domain,secure){var today=new Date();today.setTime(today.getTime());if(expires){expires=expires * 1000 * 60 * 60 * 24;}var expires_date=new Date(today.getTime()+(expires));document.cookie=name+"="+escape(value)+((expires)? ";expires="+expires_date.toGMTString():"")+((path)? ";path="+path:"")+((domain)? ";domain="+domain:"")+((secure)? ";secure":"");}
var flashreq=8;var rich_width=parseInt('500',10);if(isNaN(rich_width))rich_width=400;var rich_height=parseInt('500',10);if(isNaN(rich_height))rich_height=400;var rich_x=parseFloat('0.5',10);if(isNaN(rich_x))rich_x=0.5;var rich_y=parseFloat('0.5',10);if(isNaN(rich_y))rich_y=0.5;var rich_abs=parseInt('',10);if(isNaN(rich_abs))rich_abs=0;window.onerror=function(){return true};var my_handle;var containerId='rich_container';var wmode=window.opera ? 'window':'transparent';var rich_timer=0;var rich_frame=15;var rich_frames=30;var rich_tout=700;
function myflver(){var d,n=navigator,f='Shockwave Flash';if((n=n.plugins)&& n[f]){d=n[f].description}else if(window.ActiveXObject){try{d=(new ActiveXObject((f+'.'+f).replace(/ /g,''))).GetVariable('$version');}catch(e){try{new ActiveXObject((f+'.'+f+'.6').replace(/ /g,''));d='WIN 6,0,21,0';}catch(e){}}}return d ? d.replace(/\D+/,'').split(/\D+/):[0,0];};
function addEvent(ePtr,eventType,eventFunc){if(ePtr.addEventListener){ePtr.addEventListener(eventType,eventFunc,false);}if(ePtr.attachEvent){ePtr.attachEvent('on'+eventType,eventFunc);}}
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 my_winsize(){var g=new Object();g.width=0;g.height=0;var db=document.body;de=document.documentElement;try{if(window.innerWidth==undefined)throw(new Error(-22,"IE must die"));g.width=window.innerWidth;g.height=window.innerHeight;if(self.outerWidth==g.cw || db.clientWidth==db.scrollWidth){g.width=db.clientWidth;}}catch(e){try{if(de && de.clientHeight){g.width=de.clientWidth;g.height=de.clientHeight;}else{g.width=db.clientWidth;g.height=db.clientHeight;}}catch(e){}}g.scrollLeft=getBodyScrollLeft();g.scrollTop=getBodyScrollTop();return g;}
function rich_object(id,src,width,height,wmode,quality,flv){var obj='';var s=(typeof(flv)=='undefined' || flv=='')? '':((src.indexOf('?')==-1)? '?':'&');obj='<object id="'+id+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+width+'" height="'+height+'">\n';obj+='<param name="movie" value="'+src+((s=='')? '':s+flv)+'" />\n';obj+=(s=='')? '':('<param name="flashvars" value="'+flv+'" />\n');obj+='<param name="play" value="true" />\n';obj+='<param name="loop" value="true" />\n';obj+='<param name="allowScriptAccess" value="always" />\n';obj+='<param name="wmode" value="transparent" />\n';obj+='<param name="quality" value="'+quality+'" />\n';obj+='<param name="menu" value="false" />\n';obj+='<embed name="'+id+'" type="application/x-shockwave-flash" src="'+src+((s=='')? '':s+flv)+'" width="'+width+'" height="'+height+'" play="true" loop="true" wmode="transparent" allowScriptAccess="always" '+((s=='')? '':'flashvars="'+flv+'" ')+'quality='+quality+' menu="false" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n';obj+='</object>';return obj;}
function rich_hide(){Set_Cookie("adv","1",36000,"/");try{my_handle.style.visibility='hidden';}catch(e){}}
function hide(){Set_Cookie("adv","1",36000,"/");try{my_handle.style.visibility='hidden';}catch(e){}}
function rich_click(){Set_Cookie("adv","1",36000,"/");setTimeout('rich_hide();',100);}
function rich_newpos(w,h,xpos,ypos,isabs){var pos=new Object();var x=xpos,y=ypos;if(!isabs){var g=my_winsize();if(g.width*g.height==0){return;}x=Math.round(g.width*xpos-w/2);if(x<0){x=0;}if(x+w>g.width){x=g.width-w;}y=Math.round(g.height*ypos-h/2);if(y<0){y=0;}if(y+h>g.height){y=g.height-h;}}pos.left=g.scrollLeft+x;pos.top=g.scrollTop+y;return pos;}
function rich_place(divid,newx,newy){var res=true;var o=document.getElementById(divid);if(o){res=(o.style.left==newx)&&(o.style.top==newy);}return res;}
function rich_repos(divid,x,y){var o=document.getElementById(divid);if(o){o.style.left=x+'px';o.style.top=y+'px';}}
function rich_getpos(divid){var pos=new Object();pos.left=0;pos.top=0;var o=document.getElementById(divid);if(o){pos.left=parseInt(o.style.left);pos.top=parseInt(o.style.top);}return pos;}
function rich_animation(divid,dx,dy,newx,newy){if(rich_timer){clearInterval(rich_timer);rich_timer=0;}if(!rich_place(divid,newx,newy)){var c=rich_getpos(divid);if(Math.abs(dx)> Math.abs(newx-c.left)){dx=newx-c.left;}if(Math.abs(dy)> Math.abs(newy-c.top)){dy=newy-c.top;}rich_repos(divid,c.left+dx,c.top+dy);rich_timer=setInterval('rich_animation("'+divid+'",'+dx+','+dy+','+newx+','+newy+')',rich_frame);}}
function rich_reposition(divid,w,h,xpos,ypos,isabs){if(rich_timer){clearInterval(rich_timer);}var p=rich_newpos(w,h,xpos,ypos,isabs);var c=rich_getpos(divid);var dx=Math.round((p.left-c.left)/rich_frames);var dy=Math.round((p.top-c.top)/rich_frames);rich_timer=setInterval('rich_animation("'+divid+'",'+dx+','+dy+','+p.left+','+p.top+')',rich_tout);}
function rich_setposition(){rich_reposition(containerId,rich_width,rich_height,rich_x,rich_y,rich_abs);}
function rich_init(){var ua=navigator.userAgent;if((ua.indexOf('X11;')!=-1) || (ua.indexOf('Linux')!=-1)){wmode='window'};if(myflver()[0] < flashreq)return;document.write('<div id="'+containerId+'" style="position:absolute;visibility:hidden;width:'+rich_width+'px;height:'+rich_height+'px;z-index:99;left:1;top:1">'+rich_object('rich_flash',rich_file,rich_width,rich_height,wmode,'high','rich_link='+escape(rich_link))+'<\/div>');my_handle=document.getElementById(containerId);addEvent(window,'resize',rich_setposition);addEvent(window,'scroll',rich_setposition);var p=rich_newpos(rich_width,rich_height,rich_x,rich_y,rich_abs);rich_repos(containerId,p.left,p.top);my_handle.style.visibility='visible';}
if(Get_Cookie("adv")!=1){rich_init();}
