
function zak_pod_typ(dotaz) {

  forms_def = new Array(
    new Array('technicky','dotaz_tech'),
    new Array('katalog','dotaz_katalog'),
    new Array('jiny','dotaz_jiny')
  );

  for ( i=0;i<forms_def.length;i++ ) {
    if ( forms_def[i][0]==dotaz && document.getElementById(forms_def[i][1]).style.display=='none' ) {
      document.getElementById(forms_def[i][1]).style.display = 'block';
    }
    else {
      document.getElementById(forms_def[i][1]).style.display = 'none';
    }
  }

}

function open_pop_up()
{

 okno =window.open('http://www.yr.hu/lancia/popup/form.php','mainform','width=650, height=452, left='+(screen.width-650)/2+', top='+(screen.height-452)/2);
  //okno.focus();
 

}
function openWin(windowURL, windowName, windowFeatures) {
	return window.open(windowURL, windowName, windowFeatures);
}

var souhlasBox = null;

function showSouhlasBox( cat )
{

  if ( souhlasBox!=null ) {
    hiddeSouhlasBox();
  }

  var url = 'ajax/ctyrkolka_potvrzeni.php?cat='+cat;

  souhlasBox                      = new popupBox();

  souhlasBox.closeButton          = false;
  
  souhlasBox.globalVariableName   = 'souhlasBox';
  souhlasBox.mainDivId            = 'souhlasBox';

  souhlasBox.width                = 400;
  souhlasBox.height               = 380;

  souhlasBox.paddingLeft          = souhlasBox.paddingRight  = 10;
  souhlasBox.paddingTop           = souhlasBox.paddingBottom = 10;

  souhlasBox.loadContent( url );
  souhlasBox.show();  

}


function hiddeSouhlasBox()
{
  if ( souhlasBox!=null ) {
    souhlasBox.destroyBox();
    souhlasBox    = null;
  }
}

function zavritPopUp(idPopup)
{
  var o = document.getElementById(idPopup);
  o.style.display = "none";
  o.style.visibility = "hidden";
}

function otevritPopUp(idPopup)
{
  var o = document.getElementById(idPopup);
  o.style.display = "block";
  o.style.visibility = "visible";
}
