﻿// JScript File

// Poslech swf s MP3

    function swfPlayerWindow_Hide()
    {
        document.getElementById('flashFrame').src = '';
        document.getElementById('swfPlayerWindow').style.display = 'none';        
    }
    
     function plaShow(fileURL, delka, nazev, fpFolder) {          
        document.getElementById('swfPlayerWindow').style.top = '200px';
        document.getElementById('swfPlayerWindow').style.display = 'block';         
        document.getElementById('swfPlayerWindow_nazev').innerHTML = nazev;        
        document.getElementById('flashFrame').src = fpFolder + '/getFlashWindow.aspx?file=' + fileURL + "&delka=" + document.getElementById('swfPlayerWindow_delka').value + "&start=" + document.getElementById('swfPlayerWindow_start').value;        
        }
        
        
//Nahravani fotografie        
        
    function newFoto(id)
    {   
        alert("../get/getNewImage.aspx?file=" + document.getElementById(id).value);
        document.getElementById('newFotoFrame').src = "../get/getNewImage.aspx?file=" + document.getElementById(id).value;        
    }
    
//SMS Zdarma    
    function OpenSMS(intOp) {
  if (intOp==1){
 	cil = "http://www.1188.cz/?sms=gate"; 
  int_left = Math.round((screen.width - 575)/2);
  int_top  = Math.round((screen.height - 380)/2);
	par = "width=575,height=350,left=" + int_left + ",top=" + int_top + ",scrollbars=yes,resizable=no,status=yes,toolbar=no";
	}
	else{
 	cil = "http://sms.Vodafone.cz" // /s_main.php3?locale=cz#number" 
  int_left = Math.round((screen.width - 575)/2);
  int_top  = Math.round((screen.height - 665)/2);
	par = "width=950,height=750,left=" + int_left + ",top=" + int_top + ",scrollbars=yes,resizable=no,status=yes,toolbar=no";
	}
	win = window.open(cil, 'ViewTel', par);
	win.focus();
	
}   
                    
    
//AJAX  
        var xmlhttp
        var strGet

        function loadXMLDoc(url, idChangeControl)
        {           
            xmlhttp=null
            // pro Mozilla, apod.
            if (window.XMLHttpRequest)
            {
            xmlhttp=new XMLHttpRequest()
            }
            // pro IE IE
            else if (window.ActiveXObject)
            {
            xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
            }        
            if (xmlhttp!=null)
            {            
            xmlhttp.onreadystatechange=state_Change
            xmlhttp.open("GET",url,true)                       
            
            if (strGet=='null') 
                    {
                        document.getElementById('autori').style.display='none';
                    }                       
                    else                
                    {                        
                        document.getElementById('autori').innerHTML = xmlhttp.responseText
                        document.getElementById('autori').style.display='block';
                    }  
            xmlhttp.send(null)                     
            }
                        
        }

        function state_Change()
        {
            // if xmlhttp == "loaded" (kod 4)                           
            if (xmlhttp.readyState==4)
            {
            // if "OK" (kod 200)            
            if (xmlhttp.status==200)
                {
                    strGet = xmlhttp.responseText;                    
                }              
            }
        }
    