/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */


function getXMLHTTPRequest(){
    try{
        req=new XMLHttpRequest();
    }catch(errl){
        try{
         req=new ActiveXObject("Msxml2.XMLHTTP");
        }catch(err2){
            req=new ActiveXObject("Microsoft.XMLHTTP");
        }
    }

    return req;
}

var http=new getXMLHTTPRequest();

function GetWizard(){

    var i;
    var myurl="wizard.php";

    
    for (i=0;i<document.formwizard.optionswizard.length;i++){
        if (document.formwizard.optionswizard[i].checked)
        break;
    }

    optionvalue = document.formwizard.optionswizard[i].value;    
    myrand = parseInt(Math.random()*9999999999);    
    var modurl=myurl+"?option_L="+optionvalue+"&rand="+myrand;
    http.open("GET", modurl, true);
    http.onreadystatechange=useHttpResponse;
    http.send(null);
}

function useHttpResponse(){
    if(http.readyState==4){
        if(http.status==200){
            var texthtml=http.responseText;            
            document.getElementById('dinamic_wizard').innerHTML=texthtml;
        }

    }else{
        document.getElementById('dinamic_wizard').innerHTML='<img src="imagenes/basic/9.gif">';
    }
}
