var SITE_URL='http://www.usmihnat.com/';
var embedLang='bg';
var refsite='0';
var s=''
var img='';
var imgLink='
';;
var hidden='';
var closebutt='';
var movwxy='';
var wsize = getSize();
var setPos = false;
var popWidth=330;
var popHeight=482;
var ie=document.all&&navigator.userAgent.indexOf("Opera")==-1;
img+='
';
//img+=imgLink;
img+='
';
hidden='';
closebutt='
';
//closebutt='
';
hidden+='
';
function embed(){
document.writeln(img);
s='';//img;
s+=hidden;
document.getElementById('luckimg').innerHTML=imgLink;
document.writeln(s);
//dhtmlLoadScript('http://www.google-analytics.com/urchin.js');
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
var pageTracker = _gat._getTracker("UA-1643093-4");
pageTracker._trackPageview();
} catch(err) {}
}
embed();
var al=0;
function setLuckPos() {
document.getElementById('luckdiv').style.display='inline';
var luckdiv = document.getElementById('luckdiv');
var coords = _findCenterLeftCoords(luckdiv);
luckdiv.style.left=coords.x+'px';
luckdiv.style.top=coords.y+'px';
return true;
}
function popup() {
document.getElementById('luckimg').innerHTML='';
document.getElementById('luckdiv').innerHTML=closebutt+'';
var frame1 = document.getElementById('fortunePopUp');
var loadingImg = document.getElementById('loadingImg');
loadingImg.display = 'block';
frame1.display = 'none';
if (frame1.onload == null) {
frame1.onload = function() {
loadingImg.style.display = 'none'
frame1.style.display = 'block';
};
if (window.attachEvent) {
frame1.attachEvent('onload', frame1.onload);
}
}
setLuckPos();
}
function closeme() {
clearTimeout(setPos);
document.getElementById('luckimg').innerHTML=imgLink;
document.getElementById('luckdiv').innerHTML='';//hidden;
document.getElementById('luckdiv').style.display='none';
return true;
}
function getSize() {
var wsize = new Object();
wsize.x=630;
wsize.y=460;
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
wsize.x= window.innerWidth;
wsize.y= window.innerHeight;
}
if (navigator.appName.indexOf("Microsoft")!=-1) {
wsize.x= document.body.offsetWidth;
wsize.y= document.body.offsetHeight;
}
return wsize;
}
return false;
}
function getPos(inputElement) {
var coords = new Object();
coords.x = 0;
coords.y = 0;
try {
targetElement = inputElement;
if(targetElement.x && targetElement.y) {
coords.x = targetElement.x;
coords.y = targetElement.y;
} else {
if(targetElement.offsetParent) {
coords.x += targetElement.offsetLeft;
coords.y += targetElement.offsetTop;
while(targetElement = targetElement.offsetParent) {
coords.x += targetElement.offsetLeft;
coords.y += targetElement.offsetTop;
}
} else {
//alert(\"Could not find any reference for coordinate positioning.\");
}
}
return coords;
} catch(error) {
//alert(error.msg);
return coords;
}
}
function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function dhtmlLoadScript(url)
{
var e = document.createElement("script");
e.src = url;
e.type="text/javascript";
document.getElementsByTagName("head")[0].appendChild(e);
}
//alert(getPos(document.getElementById('luckimg')). );
//document.onload=embed();
_findCenterLeftCoords = function(obj) {
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape" || navigator.appName=='Opera') {
winW = window.innerWidth;
winH = window.innerHeight;
}
if (navigator.appName.indexOf("Microsoft")!=-1) {
//winW = document.body.offsetWidth;
winW = document.documentElement.clientWidth;
//winH = document.body.offsetHeight;
winH = document.documentElement.clientHeight;
}
}
var x = ((winW/2)-(obj.offsetWidth/2));
var y = ((winH/2)-(obj.offsetHeight/2));
return { 'x':x, 'y':y };
}