function gid(id){return document.getElementById(id)}
function dis(id,val){var re=new RegExp(" ","gim");id=id.replace(re,'');id=id.split(',');var size=id.length;for($i=0;$i<size;$i++){if(id[$i].length<1)continue;var obj=gid(id[$i]).style;if(obj.display!=val)obj.display=val;}}
function gdis(id){return gid(id).style.display}
function SetClass(obj,val){obj.className=val;}
function getmail(id){var neww=open(gid('path').value+"inc/getemail.php?t="+id+"&lang="+gid('lang').value,target="_blank"," status=no, toolbar=no, menubar=no, scrollbars=yes, width=400, height=100");}
function flashRow(a){tds=a.getElementsByTagName('TD');for(var i=0;i<tds.length;i++){if(tds[i].className.length<5){tds[i].remClassName=tds[i].className;tds[i].className=tds[i].className+'flash';}}}
function unFlashRow(a){tds=a.getElementsByTagName('TD');for(var i=0;i<tds.length;i++){tds[i].className=tds[i].remClassName;}}
function setElementOpacity(sElemId,nOpacity){var opacityProp=getOpacityProperty();var elem=document.getElementById(sElemId);if(!elem||!opacityProp)return;if(opacityProp=="filter"){nOpacity*=100;var oAlpha=elem.filters['DXImageTransform.Microsoft.alpha']||elem.filters.alpha;if(oAlpha)oAlpha.opacity=nOpacity;else elem.style.filter+="progid:DXImageTransform.Microsoft.Alpha(opacity="+nOpacity+")";}
else
elem.style[opacityProp]=nOpacity;}
function getOpacityProperty(){if(typeof document.body.style.opacity=='string')
return'opacity';else if(typeof document.body.style.MozOpacity=='string')
return'MozOpacity';else if(typeof document.body.style.KhtmlOpacity=='string')
return'KhtmlOpacity';else if(document.body.filters&&navigator.appVersion.match(/MSIE ([\d.]+);/)[1]>=5.5)
return'filter';return false;}
var http_request=false,out='';function innerResult(){if(http_request.readyState==4){if(http_request.status==200)gid(out).innerHTML=http_request.responseText;}}
function makeRequest(url,parameters,tout){out=tout;http_request=false;if(window.XMLHttpRequest){http_request=new XMLHttpRequest();if(http_request.overrideMimeType)http_request.overrideMimeType('text/html');}else if(window.ActiveXObject){try{http_request=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}
if(!http_request){alert('Cannot create XMLHTTP instance');return false;}
var pat=/\.php/;if(pat.test(url)!=true)url+='.php';http_request.onreadystatechange=innerResult;http_request.open('POST',gid('path').value+url,true);http_request.setRequestHeader("Content-type","application/x-www-form-urlencoded");http_request.setRequestHeader("Content-length",parameters.length);http_request.setRequestHeader("Connection","close");http_request.send(parameters);}
var tptimeout;var OP=(navigator.userAgent.indexOf('Opera')!=-1);var IE=(navigator.userAgent.indexOf('MSIE')!=-1&&!OP);var GK=(navigator.userAgent.indexOf('Gecko')!=-1);var SA=(navigator.userAgent.indexOf('Safari')!=-1);var DOM=document.getElementById;var tooltip=null;function TOOLTIP(){this.width=200;this.bgColor="#e7e2d6";this.textFont="Comic Sans MS";this.textSize=12;this.textColor="#A00000";this.border="1px dashed #64635f";this.opacity=80;this.cursorDistance=5;this.text='';this.height=0;this.obj=null;this.active=false;this.create=function(){if(!this.obj)this.init();var s=(this.textFont?'font-family:'+this.textFont+'; ':'')+
(this.textSize?'font-size:'+this.textSize+'px; ':'')+
(this.border?'border:'+this.border+'; ':'')+
(this.textColor?'color:'+this.textColor+'; ':'');var t='<table border=0 cellspacing=0 cellpadding=1 width='+this.width+'><tr>'+'<td align=center'+(s?' style="'+s+'"':'')+'>'+this.text+'</td></tr></table>';if(DOM||IE)this.obj.innerHTML=t;if(DOM)this.height=this.obj.offsetHeight;else if(IE)this.height=this.obj.style.pixelHeight;if(this.bgColor)this.obj.style.backgroundColor=this.bgColor;this.setOpacity();}
this.init=function(){if(DOM)this.obj=document.getElementById('ToolTip');else if(IE)this.obj=document.all.ToolTip;}
this.move=function(){var winX=getWinX()-(((GK&&!SA)||OP)?17:0);var winY=getWinY()-(((GK&&!SA)||OP)?17:0);var x=mouseX;var y=mouseY;if(x+this.width+this.cursorDistance>winX+getScrX())
x-=this.width+this.cursorDistance;else x+=this.cursorDistance;if(y+this.height+this.cursorDistance>winY+getScrY())
y-=this.height;else y+=this.cursorDistance;this.obj.style.left=x+'px';this.obj.style.top=y+'px';}
this.show=function(){this.move();this.obj.style.zIndex=69;this.active=true;this.obj.style.visibility='visible';}
this.hide=function(){this.obj.style.zIndex=-1;this.active=false;this.obj.style.visibility='hidden';}
this.setOpacity=function(){this.obj.style.opacity=this.opacity/100;this.obj.style.MozOpacity=this.opacity/100;this.obj.style.KhtmlOpacity=this.opacity/100;this.obj.style.filter='alpha(opacity='+this.opacity+')';}}
function getScrX(){var offset=0;if(window.pageXOffset)
offset=window.pageXOffset;else if(document.documentElement&&document.documentElement.scrollLeft)
offset=document.documentElement.scrollLeft;else if(document.body&&document.body.scrollLeft)
offset=document.body.scrollLeft;return offset;}
function getScrY(){var offset=0;if(window.pageYOffset)
offset=window.pageYOffset;else if(document.documentElement&&document.documentElement.scrollTop)
offset=document.documentElement.scrollTop;else if(document.body&&document.body.scrollTop)
offset=document.body.scrollTop;return offset;}
function getWinX(){var size=0;if(window.innerWidth)
size=window.innerWidth;else if(document.documentElement&&document.documentElement.clientWidth)
size=document.documentElement.clientWidth;else if(document.body&&document.body.clientWidth)
size=document.body.clientWidth;else size=screen.width;return size;}
function getWinY(){var size=0;if(window.innerHeight)
size=window.innerHeight;else if(document.documentElement&&document.documentElement.clientHeight)
size=document.documentElement.clientHeight;else if(document.body&&document.body.clientHeight)
size=document.body.clientHeight;else size=screen.height;return size;}
function getMouseXY(e){if(e&&e.pageX!=null){mouseX=e.pageX;mouseY=e.pageY;}
else if(event&&event.clientX!=null){mouseX=event.clientX+getScrX();mouseY=event.clientY+getScrY();}
if(mouseX<0)mouseX=0;if(mouseY<0)mouseY=0;if(tooltip&&tooltip.active)tooltip.move();}
function toolTip(text,width,opacity){if(text){clearTimeout(tptimeout);tooltip=new TOOLTIP();tooltip.text=text;if(width)tooltip.width=width;if(opacity)tooltip.opacity=opacity;tooltip.create();tptimeout=setTimeout("tooltip.show()",800);}else if(tooltip){clearTimeout(tptimeout);tooltip.hide();}}
document.write('<div id="ToolTip" style="position:absolute; visibility:hidden"></div>');var mouseX=mouseY=0;document.onmousemove=getMouseXY;function detectCode(event){var e=(window.event)?window.event:event;if(e.keyCode==13)WhoisMe();}
function WhoisMe(){if(gid('d_name').value!='введите имя'){gid('result').innerHTML='<img src="'+gid('path').value+'inc/loading.gif" alt="">';var poststr="d_name="+encodeURI(gid('d_name').value)+"&d_per="+encodeURI(gid('d_per').value);makeRequest('inc/whois',poststr,'result');}else{gid('result').innerHTML='<font color="#ff0000">Вы не указали имя</font>';}}
function showtattoo(page){var poststr="page="+page;makeRequest('inc/tatoo',poststr,'tattoo');}
function echoFlash(aWidth,aHeight,aID,aPach,aBgColor,aVersion,aQuality,outstr){var o={};o.width=aWidth;o.height=aHeight;o.id=aID;o.name=aPach;o.bgcolor=(aBgColor)?aBgColor:"#ffffff";o.ver=(aVersion)?aVersion:"7";o.quality=(aQuality)?aQuality:"high";o.wmode="window";o.scale=(o.scale)?o.scale:"noscale";if(o.nocache=="true")o.name+="?"+new Date().getTime();var str='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+o.ver+',0,0,0" ';str+='id="'+o.id+'" ';if(o.align)str+='align="'+o.align+'" ';str+='width="'+o.width+'" height="'+o.height+'"><param name="movie" value="'+o.name+'"/><param name="bgcolor" value="'+o.bgcolor+'"/><param name="quality" value="'+o.quality+'"/>';if(o.base)str+='<param name="base" value="'+o.base+'"/>';if(o.flashvars)str+='<param name="flashvars" value="'+o.flashvars+'"/>';if(o.allowScriptAccess)str+='<param name="allowScriptAccess" value="'+o.allowScriptAccess+'"/>';if(o.salign)str+='<param name="salign" value="'+o.salign+'"/>';if(o.wmode)str+='<param name="wmode" value="'+o.wmode+'"/>';str+='<param name="scale" value="'+o.scale+'"/><embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" name="'+o.id+'" src="'+o.name+'" bgcolor="'+o.bgcolor+'" ';if(o.flashvars)str+='flashvars="'+o.flashvars+'" ';if(o.swLiveConnect)str+='swLiveConnect="'+o.swLiveConnect+'" ';if(o.allowScriptAccess)str+='allowScriptAccess="'+o.allowScriptAccess+'" ';str+='quality="'+o.quality+'" ';if(o.base)str+='base="'+o.base+'" ';if(o.wmode)str+='wmode="'+o.wmode+'" ';if(o.salign)str+='salign="'+o.salign+'" ';str+='scale="'+o.scale+'" width="'+o.width+'" height="'+o.height+'"></embed></object>';if(outstr)return str;document.writeln(str);}
function showfla(){var fla=echoFlash(934,625,"movie",gid('path').value+"inc/styles/index/_.swf","#e0dcd1",8,"high",1);gid('seeflash').innerHTML=fla+'<br><a href="'+gid('path').value+'main" class="lnk">Войти на сайт</a><br>';}
function dw(str){document.writeln(str);}
function Show(id){document.getElementById(id).style.display='block';}
function tHide(){document.getElementById(tid).style.display='none';}
function Hide(id){tid=id;setTimeout("tHide()",1000);}
