function IndexSWF() {
  var Content = '';
	Content = 
		'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="960" height="425" id="index_msk" align="middle">' +
		'<param name="allowScriptAccess" value="sameDomain" />' +
		'<param name="movie" value="/swf/index_msk.swf" />' +
		'<param name="quality" value="high" />' +
		'<param name="bgcolor" value="#ffffff" />' +
		'<embed src="/swf/index_msk.swf" quality="high" bgcolor="#ffffff" width="960" height="425" name="index_msk" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
		'</object>';
	document.write(Content);
}

function setCookie(name, value, expires, path, domain, secure) {
        var curCookie = name + "=" + escape(value) +
                ((expires) ? "; expires=" + expires.toGMTString() : "") +
                ((path) ? "; path=" + path : "") +
                ((domain) ? "; domain=" + domain : "") +
                ((secure) ? "; secure" : "")
        if ((name + "=" + escape(value)).length <= 4000)
                document.cookie = curCookie
        else
                if (confirm("Cookie превышает 4KB и будет вырезан !"))
                        document.cookie = curCookie
}

function getCookie(name) {
        var prefix = name + "="
        var cookieStartIndex = document.cookie.indexOf(prefix)
        if (cookieStartIndex == -1)
                return null
        var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length)
        if (cookieEndIndex == -1)
                cookieEndIndex = document.cookie.length
        return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
}

function PopupNewYear(width, height) {
	if (getCookie("newyear")) {
		return null;
	}
	else {
		var x,y;
		x = screen.width;
		y = screen.height;
		var Xpopup;
		Xpopup = (x/2)-(width/2);
		var	Ypopup;
		Ypopup = (y/2)-(height/2);

		wndCover = window.open("/html/apolitica_ny2008", "popup", "width="+width+",height="+height+"dependent,alwaysRaised,left="+Xpopup+",top="+Ypopup);
		add_cart = wndCover;
		setCookie ("newyear", "1", false, '/');
		return wndCover;
	}
}
