function printPage()
{
   var options = "menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes,width=630,height=460;"
   url = top.location.href;
   if (url.indexOf("#")>0) url = url.substring(0, url.indexOf("#"));
   if (url.indexOf("?")>0) url = url + "&print=yes";
   else url = url + "?print=yes";
   printWindow=window.open(url,"_blank",options);
}

function printPageEn()
{
   var options = "menubar=yes,toolbar=yes,scrollbars=yes,resizable=yes,width=630,height=460;"
   url = top.location.href;
   if (url.indexOf("#")>0) url = url.substring(0, url.indexOf("#"));
   if (url.indexOf("?")>0) url = url + "&print=yes&eng=yes";
   else url = url + "?print=yes&eng=yes";
   printWindow=window.open(url,"_blank",options);
}

function popup(url, width, height)
{
      var options = "toolbar=no,scrollbars=yes,resizable=yes,width="+width+",height="+height+";"
      popupWindow=window.open(url,"_blank",options);
}

function wjPopup(url, width, height)
{
      var options = "toolbar=no,scrollbars=yes,resizable=yes,width="+width+",height="+height+";"
      popupWindow=window.open(url,"_blank",options);
}

//SSL force
if (window.location.href.indexOf("http://")==0)
{
   //window.location.href = "https://"+window.location.href.substring(7);
}

var exformurl = "";
exformopen = 0;
function exform(url)
{
  exformurl = url;
  if(exformopen == 0)
  {
    document.getElementById('exform').style.display = "block";
    document.dotaznikForm.forward.value = url;
  }
  else if(exformopen == 1) location.href(url);
}
function unexform()
{
  document.getElementById('exform').style.display = "none";
  exformopen = 1;
  if(exformurl!="") location.href(exformurl);
}

function goSSLCZ(url)
{
   window.location.href="https://www.ingkonto.cz"+url;
}
function goSSLSK(url)
{
   window.location.href="https://www.ingkonto.cz"+url;
}

//hover efekt pre horne menu

sfHover = function() {
  if (document.getElementById("nav")!=null)
  {
    var sfEls=new Array();
    sfEls[0] = document.getElementById("nav").getElementsByTagName("LI");
    for (var i=0; i<sfEls.length; i++) {
    for (var j=0; j<sfEls[i].length; j++) {
    sfEls[i][j].onmouseover=function() {
    this.className+=" hover";
    }
    sfEls[i][j].onmouseout=function() {
    this.className=this.className.replace(new RegExp(" hover\\b"), "");
    }
    }
    }
  }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


sfHover = function() {
  if (document.getElementById("nav2")!=null)
  {
    var sfEls=new Array();
    sfEls[0] = document.getElementById("nav2").getElementsByTagName("LI");
    for (var i=0; i<sfEls.length; i++) {
    for (var j=0; j<sfEls[i].length; j++) {
    sfEls[i][j].onmouseover=function() {
    this.className+=" hover";
    }
    sfEls[i][j].onmouseout=function() {
    this.className=this.className.replace(new RegExp(" hover\\b"), "");
    }
    }
    }
  }
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

//    otvorenie okna pre Euro kalkulacku (ING.sk)

function openWindowPopup(url,scroll,windowName,resizable) {
	 var heightWindow = 410;
	 var widthWindow = 220;
	 if (!resizable) resizable = "no"
	 if (windowName==null) {
	 	windowName = Math.random() + "";
	 	windowName = windowName.replace(".","x");
	 } else {
	  var ran = Math.random() + "";
	  ran = ran.replace(".","x");
	  /* chceme vzdy nove okno (mnozstvi n)*/
	  //windowName = windowName + ran;
	  /* chceme jen jedno okno (mnozstvi 1)*/
	  windowName = windowName;	 	
	 }
	 	/* na stred*/
	 //poziceTop = (screen.height - heightWindow)/2;
	 //poziceLeft = (screen.width - widthWindow)/2;
	 	/*vpravo nahoru*/
	 poziceTop = (0 + (5));
	 poziceLeft = (screen.width - (41+widthWindow));
	 var result = window.open(url,windowName,'scrollbars=' + scroll +',resizable=' + resizable + ',personalbar=no,menubar=no,status=yes,toolbar=no,height=' + heightWindow + ',width=' + widthWindow+ ',left=' + poziceLeft + ',top=' + poziceTop + ',screenX=0,screenY=0');  
}

//funkcia pre JS zapis flash objektu. Musi byt externe inak to v IE neslo
function writeFlash(link,width,height)
{
 document.write('<object type="application/x-shockwave-flash" height="'+height+'" width="'+width+'" data="'+link+'"> <param value="'+link+'" name="movie"/> <param value="high" name="quality"/> <param value="transparent" name="wmode"/> <param value="exactfit" name="scale"/></object>');
}

$(document).ready(function(){
            if ($('div.faq h3').length > 0) {
		
		$('div.faq h3').click(function(){
			$(this).next().toggle();
		});

                $('div.faq h3').hover(function(){
			$(this).css("color","#FF6600");
		},function(){
			$(this).css("color","#3399CC");
		});
           }
	});
	
	