//otevre odkaz v novem okne (misto _blank, ktery je v HTML 4.01 strict zapovezen)
function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 for (var i=0; i<anchors.length; i++) { 
   var anchor = anchors[i]; 
   if (anchor.getAttribute("href") && 
       anchor.getAttribute("rel") == "external") 
     anchor.target = "_blank"; 
 } 
} 

//otevre nove - vycentrovane okno
function PopUp(theURL, winName, wi, he) 
{
   var x=(screen.width-wi)/2;
   var y=(screen.height-he)/2;
   winpa='height='+he+',width='+wi+',top='+y+',left='+x+'scrollbars=no, toolbar=no, resizable=no, menubar=yes';
   win=window.open(theURL, winName, winpa);

verze = parseInt(navigator.appVersion);
  if(verze >= 4) {
   if (typeof(win.document) == "object") win.focus();
  }
}

//otevre nove okno - fullscreen 
function PopUpFull(url, name) {
	popupWin = window.open(url, name, 'fullscreen=1, scrollbars=1');
}

//kontrola formulare
var ff1 = new Array()
ff1[0] = new MeText( "Jméno a příjmení", false )
ff1[1] = new MeText( "E-mail", false )
ff1[2] = new MeText( "Telefon", true )
ff1[3] = new MeText( "Předmět zprávy", true )
ff1[4] = new MeText( "Text zprávy", false )

function MeText( strName, fAllowEmpty ){
   this.strName = strName   
   this.fAllowEmpty = fAllowEmpty
   this.Validate = function( field ) {
       if ( (!this.fAllowEmpty) && (field.value=="") ) {
           alert('Vyplňte prosím hodnotu do pole "' + this.strName + '".')
           field.focus()
           return false    
       }
       return true
   }
}
 function Validate(theForm,arr) {
    for( var i=0; i<theForm.length; i++ ) {
        if( arr[i] ) {
            if( !arr[i].Validate(theForm.elements[i]) )
                return false
        }
    }
    return true;
}




//zruseni framu
function noframes() {
	if (top.location != self.location) {
		top.location.href = self.location.href;
	}
}

//presun na stranku h4t3k.html
function h4t3k() {
self.location.href="h4t3k.php";
}




