document.writeln('<style type="text/css">#skonlineoverlay {');
document.writeln('width:100%;');
document.writeln('height: 100%;');
document.writeln('background-color: #000;');
document.writeln('z-index: 1001;');
document.writeln('-moz-opacity: 0.8;');
document.writeln('opacity: .80;');
document.writeln('filter: alpha(opacity=80);');
document.writeln('}');
document.writeln('#sozo, #sozo a {');
document.writeln('color:#fff;');
document.writeln('background-color: #000;');
document.writeln('}');
document.writeln('</style><script type="text/javascript">');
document.writeln('function addLoadEvent(func)');
document.writeln('{');
document.writeln('var oldonload = window.onload;');
document.writeln('if (typeof window.onload != \'function\'){');
document.writeln('window.onload = func;');
document.writeln('} else {');
document.writeln('window.onload = function(){');
document.writeln('oldonload();');
document.writeln('func();');
document.writeln('}');
document.writeln('}');
document.writeln('}');
document.writeln('function getPageScroll(){');
document.writeln('var yScroll;');
document.writeln('if (self.pageYOffset) {');
document.writeln('yScroll = self.pageYOffset;');
document.writeln('} else if (document.documentElement && document.documentElement.scrollTop){	 // Explorer 6 Strict');
document.writeln('yScroll = document.documentElement.scrollTop;');
document.writeln('} else if (document.body) {// all other Explorers');
document.writeln('yScroll = document.body.scrollTop;');
document.writeln('}');
document.writeln('arrayPageScroll = new Array(\'\',yScroll)');
document.writeln('return arrayPageScroll;');
document.writeln('}');
document.writeln('function getPageSize(){');
document.writeln('var xScroll, yScroll;');
document.writeln('if (window.innerHeight && window.scrollMaxY) {');
document.writeln('xScroll = document.body.scrollWidth;');
document.writeln('yScroll = window.innerHeight + window.scrollMaxY;');
document.writeln('} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac');
document.writeln('xScroll = document.body.scrollWidth;');
document.writeln('yScroll = document.body.scrollHeight;');
document.writeln('} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari');
document.writeln('xScroll = document.body.offsetWidth;');
document.writeln('yScroll = document.body.offsetHeight;');
document.writeln('}');
document.writeln('var windowWidth, windowHeight;');
document.writeln('if (self.innerHeight) {	// all except Explorer');
document.writeln('windowWidth = self.innerWidth;');
document.writeln('windowHeight = self.innerHeight;');
document.writeln('} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode');
document.writeln('windowWidth = document.documentElement.clientWidth;');
document.writeln('windowHeight = document.documentElement.clientHeight;');
document.writeln('} else if (document.body) { // other Explorers');
document.writeln('windowWidth = document.body.clientWidth;');
document.writeln('windowHeight = document.body.clientHeight;');
document.writeln('}');
document.writeln('// for small pages with total height less then height of the viewport');
document.writeln('if(yScroll < windowHeight){');
document.writeln('pageHeight = windowHeight;');
document.writeln('} else {');
document.writeln('pageHeight = yScroll;');
document.writeln('}');
document.writeln('// for small pages with total width less then width of the viewport');
document.writeln('if(xScroll < windowWidth){');
document.writeln('pageWidth = windowWidth;');
document.writeln('} else {');
document.writeln('pageWidth = xScroll;');
document.writeln('}');
document.writeln('arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)');
document.writeln('return arrayPageSize;');
document.writeln('}');
document.writeln('function hideskonline()');
document.writeln('{');
document.writeln('// get objects');
document.writeln('objOverlay = document.getElementById(\'skonlineoverlay\');');
document.writeln('objLightbox = document.getElementById(\'skonlinediv\');');
document.writeln('// hide lightbox and overlay');
document.writeln('objOverlay.style.display = \'none\';');
document.writeln('objLightbox.style.display = \'none\';');
document.writeln('// make select boxes visible');
document.writeln('selects = document.getElementsByTagName("select");');
document.writeln('for (i = 0; i != selects.length; i++) {');
document.writeln('selects[i].style.visibility = "visible";');
document.writeln('}');
document.writeln('objects = document.getElementsByTagName("object");');
document.writeln('for (i = 0; i != objects.length; i++) {');
document.writeln('objects[i].style.visibility = "visible";');
document.writeln('}');
document.writeln('}');
document.writeln('function showskonline()');
document.writeln('{');
document.writeln('// prep objects');
document.writeln('var objOverlay = document.getElementById(\'skonlineoverlay\');');
document.writeln('var objLightbox = document.getElementById(\'skonlinediv\');');
document.writeln('var arrayPageSize = getPageSize();');
document.writeln('var arrayPageScroll = getPageScroll();');
document.writeln('// set height of Overlay to take up whole page and show');
document.writeln('objOverlay.style.height = (arrayPageSize[1] + \'px\');');
document.writeln('objOverlay.style.display = \'block\';');
document.writeln('// center lightbox and make sure that the top and left values are not negative');
document.writeln('// and the image placed outside the viewport');
document.writeln('//var lightboxTop = arrayPageScroll[1] + ((arrayPageSize[3] - 35 - imgPreload.height) / 2);');
document.writeln('var lightboxTop = 15;');
document.writeln('//var lightboxLeft = ((arrayPageSize[0] - 20 - imgPreload.width) / 2);');
document.writeln('var lightboxLeft = 15;');
document.writeln('objLightbox.style.top = (lightboxTop < 0) ? "0px" : lightboxTop + "px";');
document.writeln('objLightbox.style.left = (lightboxLeft < 0) ? "0px" : lightboxLeft + "px";');
document.writeln('objLightbox.style.height= (arrayPageSize[1]-30) + "px";');
document.writeln('selects = document.getElementsByTagName("select");');
document.writeln('for (i = 0; i != selects.length; i++) {');
document.writeln('selects[i].style.visibility = "hidden";');
document.writeln('}');
document.writeln('objects = document.getElementsByTagName("object");');
document.writeln('for (i = 0; i != objects.length; i++) {');
document.writeln('objects[i].style.visibility = "hidden";');
document.writeln('}');
document.writeln('objLightbox.style.display = \'block\';');
document.writeln('arrayPageSize = getPageSize();');
document.writeln('objOverlay.style.height = (arrayPageSize[1] + \'px\');');
document.writeln('}');
document.writeln('function initskonline()');
document.writeln('{');
document.writeln('var objBody = document.getElementsByTagName("body").item(0);');
document.writeln('// create overlay div and hardcode some functional styles (aesthetic styles are in CSS file)');
document.writeln('var objOverlay = document.createElement("div");');
document.writeln('objOverlay.setAttribute(\'id\',\'skonlineoverlay\');');
document.writeln('objOverlay.onclick = function () {hideskonline(); return false;}');
document.writeln('objOverlay.style.display = \'none\';');
document.writeln('objOverlay.style.position = \'absolute\';');
document.writeln('objOverlay.style.top = \'0\';');
document.writeln('objOverlay.style.left = \'0\';');
document.writeln('objOverlay.style.zIndex = \'90\';');
document.writeln('objOverlay.style.width = \'100%\';');
document.writeln('objBody.insertBefore(objOverlay, objBody.firstChild);');
document.writeln('var arrayPageSize = getPageSize();');
document.writeln('var arrayPageScroll = getPageScroll();');
document.writeln('// create lightbox div, same note about styles as above');
document.writeln('var objLightbox = document.createElement("div");');
document.writeln('objLightbox.setAttribute(\'id\',\'skonlinediv\');');
document.writeln('objLightbox.style.display = \'none\';');
document.writeln('objLightbox.style.position = \'absolute\';');
document.writeln('objLightbox.style.zIndex = \'100\';');
document.writeln('objLightbox.style.top = \'15\';');
document.writeln('objLightbox.style.left = \'15\';');
document.writeln('objLightbox.style.width = \'95%\';');
document.writeln('objLightbox.innerHTML=\'<div id="sozo" width="100%" style="padding: 3px; text-align: right;"><a href="javascript:hideskonline();">Close window</a></div><iframe src="http://www.en.slovakonline.sk/partner/2" frameborder="0" name="sonlineframe" id="sonlineframe" width="100%" height="95%"></iframe>\';');
document.writeln('objBody.insertBefore(objLightbox, objOverlay.nextSibling);');
document.writeln('}');
document.writeln('String.prototype.charRefToUnicode = function()');
document.writeln('{');
document.writeln('return this.replace(');
document.writeln('/&#(([0-9]{1,7})|(x[0-9a-f]{1,6}));?/gi,');
document.writeln('function(match, p1, p2, p3, offset, s)');
document.writeln('{');
document.writeln('return String.fromCharCode(p2 || ("0" + p3));');
document.writeln('});');
document.writeln('}');
document.writeln('function sofc() {');
document.writeln('var sod=document.getElementById(\'sonlinediv\');');
document.writeln('var sof=document.getElementById(\'sonlineframe\');');
document.writeln('var sof2=document.getElementById(\'sonlinefader\');');
document.writeln('sof2.style.visibility=\'hidden\';');
document.writeln('sof2.style.display=\'none\';');
document.writeln('sof.src=\'\';');
document.writeln('sod.style.visibility=\'hidden\';');
document.writeln('sod.style.display=\'none\';');
document.writeln('}');
document.writeln('addLoadEvent(initskonline);');
document.writeln('</script>');
