var frequencyCap = 4; //интервал времени в часах

function S_Cookie(cookieName,cookieValue, expirehours)

 {
  if (frequencyCap > 0)
     {var today = new Date();
     var expire = new Date();
     expire.setTime(today.getTime() + 3600000 * frequencyCap);
     document.cookie = cookieName+"="+escape(cookieValue)+ ";expires="+expire.toGMTString() + "; path=/; ";
     }
     else
     {
     document.cookie = cookieName+"="+escape(cookieValue) + "; path=/; ";
      }
 }
  function G_Cookie(cookieName) 
     {var theCookie=""+document.cookie;
     var ind=theCookie.indexOf(cookieName);
     if (ind==-1 || cookieName=="") return ""; 
     var ind1=theCookie.indexOf(';',ind);
     if (ind1==-1) ind1=theCookie.length; 
     return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
     }
if (G_Cookie('PopUnder24') == '78')
    {

S_Cookie('PopUnder24','77', frequencyCap); // ставим куки 

document.write("<div id='PopWin' onclick='flashClose()'>");
document.write("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' WIDTH='400' HEIGHT='300' id='richsvadba12' ALIGN=''>");
document.write("<PARAM NAME=movie VALUE='http://nevestaspb.ru/images/banners/limo-alliance/limuzin.swf?link1=http://limo-alliance.ru?from=svadbaclub'>");
document.write("<PARAM NAME=quality VALUE='best'> ");
document.write("<param name=bgcolor value='#ffffff'>");
document.write("<param name=wmode value='transparent'>");
document.write("<EMBED src='http://nevestaspb.ru/images/banners/limo-alliance/limuzin.swf?link1=http://limo-alliance.ru?from=svadbaclub' quality='best' bgcolor='#ffffff' WIDTH='400' HEIGHT='300' NAME='richsvadba12' ALIGN='' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer' wmode='transparent'></EMBED>");
document.write("</OBJECT>");
document.write("</div>");
window.onscroll=MovePop; // перемещать при скроллинге
}	   

function fixed(e)
{
	if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent))
	{
	    var off = function(e)
	    {
	        var r = { left: 0, top: 0 };
	        if (e.offsetParent) r = off(e.offsetParent);
	        r.left += e.offsetLeft;
	        r.top += e.offsetTop;
	        r.width = e.offsetWidth;
	        r.height = e.offsetHeight;
	        return r;
	    }
	    var proc = function(nm, sht, bs)
	    {
	        var v = e.currentStyle[nm];
	        if (typeof e['fixedInitial' + nm + 'type'] == 'undefined')
	        {
	            if(/^[0-9]+%$/.test(v))
	            {
	                e['fixedInitial' + nm + 'value'] = parseInt(v);
	                e['fixedInitial' + nm + 'type'] = 2;
	            }
	            else if (v === 'auto')
	            {
	                e['fixedInitial' + nm + 'value'] = off(e)[nm];
	                e['fixedInitial' + nm + 'type'] = 1;
	            }
	            else
	            {
	                e['fixedInitial' + nm + 'value'] = parseInt(v);
	                e['fixedInitial' + nm + 'type'] = 1;
	            }
	        }
	        if (e['fixedInitial' + nm + 'type'] == 2)
	        {
	            e.style[nm] = (sht + bs * e['fixedInitial' + nm + 'value'] / 100) + 'px';
	        }
	        else if (e['fixedInitial' + nm + 'type'] == 1)
	        {
	            e.style[nm] = (sht + e['fixedInitial' + nm + 'value']) + 'px';
	        }
	    }
	    proc('left', document.documentElement.scrollLeft, document.documentElement.clientWidth);
	    proc('top', document.documentElement.scrollTop, document.documentElement.clientHeight);
	    proc('width', 0, document.documentElement.clientWidth);
	    proc('height', 0, document.documentElement.clientHeight);

	    return 'absolute';
    }
    else e.style.position = 'fixed';
}

function flashClose() {
document.getElementById('PopWin').style.display='none';
}

function MovePop() {	

}

