function showPopUp()
{
	var myWidth = 0, myHeight = 0;
	if (typeof(window.innerWidth) == 'number')
	{
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	}
	else if (document.documentElement &&(document.documentElement.clientWidth || document.documentElement.clientHeight))
	{
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if (document.body && (document.body.clientWidth || document.body.clientHeight))
	{
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
}

function nW(url)
{
   var Win = window.open('http://video.wtk.pl/?layout=player_new.xtm&mode=videonews&id='+url,'newPlyrWnd','width=777, height=444, resizable=0, scrollbars=no, menubar=no' );
}

function nWVS(url)
{
   var Win = window.open(url,'newPlyrWnd','fullscreen=1, resizable=1, scrollbars=1, menubar=1, status=1, toolbar=1, location=1, directories=1' );
}
function siteLoad() {
	showPopUp();
}

function findPosX(obj)
{
   	var curleft = 0;
	if(obj.offsetParent)
        while(1)
        {
			curleft += obj.offsetLeft;
			if(!obj.offsetParent)
            break;
			obj = obj.offsetParent;
        }
	else if(obj.x)
       curleft += obj.x;
	return curleft;
 	}

function getScrollY()
{
	var scrOfY = 0;
	if( typeof( window.pageYOffset ) == 'number' ) {
	    //Netscape compliant
	    scrOfY = window.pageYOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
	    //DOM compliant
	    scrOfY = document.body.scrollTop;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
	    //IE6 standards compliant mode
	    scrOfY = document.documentElement.scrollTop;
	}
	return scrOfY;
}

function moveReklama()
{
	reklama_obj = document.getElementById('reklamaPionowa');
	if (reklama_obj)
	{
		reklama_obj.style.left = findPosX(document.getElementById('topicons'))-150+'px';
		reklama_obj.style.top = getScrollY()+'px';
	}
}

function initXMLHTTPRequest()
{
	var xRequest=null;
	try
	{
	  // Firefox, Opera 8.0+, Safari
	  xRequest=new XMLHttpRequest();
	}
	catch (e)
	{
	  // Internet Explorer
	  try
	  {
	    xRequest=new ActiveXObject("Msxml2.XMLHTTP");
	  }
	  catch (e)
	  {
	    try
	    {
	      xRequest=new ActiveXObject("Microsoft.XMLHTTP");
	    }
	    catch (e)
	    {
	      alert("Twoja przegladarka nie obsluguje AJAX!");
	      return false;
	    }
	  }
	}
	return xRequest;
}