<!--

function click_on_size(){
    document.getElementById("option3").disabled='';
    document.getElementById("option4").disabled='';
    if(document.getElementById("option5").checked || document.getElementById("option6").checked){
        rewrite_external_output();
    }
}

function click_on_style(){
    document.getElementById("option5").disabled='';
    document.getElementById("option6").disabled='';
    if(document.getElementById("option5").checked || document.getElementById("option6").checked){
        rewrite_external_output();
    }
}

function click_on_kodovani(){
    document.getElementById("ext_kod").style.display='';
    document.getElementById("ext_nahled").style.display='';
    rewrite_external_output();
}

function rewrite_external_output(){
    var Kod;
    var rozmer;
    var styl;
    var src;
    var kodovani;
    
    if(document.getElementById("option1").checked){
        rozmer = 1;
    }
    
    if(document.getElementById("option3").checked){
        styl = 1;
    }else if(document.getElementById("option4").checked){
        styl = 2;
    }
    
    if(document.getElementById("option5").checked){
        kodovani = 1;
    }else if(document.getElementById("option6").checked){
        kodovani = 2;
    }
    
    src = 'http://www.edownload.cz/external'+kodovani+'.php?id='+prgid+'&amp;rozmer='+rozmer+'&amp;styl='+styl;
    Kod = '<div class="edw_externi_program'+styl+'"><strong><a title="'+prgnazev+' Download" href="http://www.edownload.cz/sw/'+prgurl+'/">'+prgnazev+' Download</a></strong><script type="text/javascript" src="'+src+'"></script></div>';
    document.getElementById("kod").value = Kod;
    
    var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
  
  xmlhttp.open("GET", "http://www.edownload.cz/external-preview.php?id="+prgid+"&s="+styl, true);
  xmlhttp.onreadystatechange=function(){
  if (xmlhttp.readyState == 4){
      txt2 = xmlhttp.responseText;
      document.getElementById('divprew').innerHTML = txt2;
  }
  }
  xmlhttp.send(null);
}



//-->
