function aprifinestra(u){
w = screen.width * 0.9;
h = (document.all ? screen.height : screen.height-150) * 0.9;
op = 'scrollbars=yes,toolbar=yes,location=yes,directories=yes,menubar=yes,resizable=yes,status=yes,width=' + w + ',height=' + h + ',screenX=0,screenY=0,top=0,left=0';
com=open(u,'',op);
}

function vai(u,w) {
if (!w) document.location.href=u;
else aprifinestra(u);
}
function link_pp()
{
var url='';
for (i = 0; i < arguments.length; i++)
   url = url + arguments[i];
    vai(url,1);
}

function t(i) {
var e = document.getElementById(i);
var t = e.className;
if (t.match('invisible')) { t = t.replace(/invisible/gi, 'visible'); }
else { t = t.replace(/visible/gi, 'invisible'); }
e.className = t;
}

//Funzione per il controllo dei checkbox di comparazione
function checkCompara(the_form,numero_scelte,msg){
    var choices = 0;
    var ritorno = false;    
    choices = contaProdottiComparati(the_form);
    if( (choices<2)||(choices>numero_scelte) ){
        //alert(msg);
	 //w_alert('listing_prodotti', msg);	
     w_alert('listing_prodotti', msg, "350", "-340", "80%", "96%");
	/*
        var div = document.getElementById('mostraMessaggio');
        div.innerHTML = "<div align=\"center\"><div id=\"messageneg\"><p>"+msg+"</p></div></div>";
        window.scrollTo(0,0);
	*/
    }else{
        ritorno = true;
    }
    return ritorno;
}

function contaProdottiComparati(form){
    //conteggio prodotti in formComparazione
    var numero = 0;
    for(i=0;i<form.elements.length;i++){
        nome = form.elements[i].name;
        if(nome == 'ricorda_prod[]'){
            numero++;
        }
    }
    return numero;
}

function scriviProdottiComparati(form){
    //riceve numero da contaProdotti e lo scrive
    var numero = contaProdottiComparati(form);
    //Scrivo nmumero
    elm= document.getElementById('ricordaProdotti');
    if(numero<2 && numero>0){
        elm.innerHTML='Hai selezionato '+numero+' prodotto';
    }else{
        elm.innerHTML='Hai selezionato '+numero+' prodotti';
    }
}

function aggiungi_togli_prodotti_comparati(form,id_prod,gruppo,checkbox){

    var aggiungi = false;
    var togli = false;
    var gruppo_corrente = '';
    var numero_prod_selezionati = 0;   

    //check togli/aggiungi
    if(checkbox.checked){
        aggiungi = true;
    }else{
        togli = true;
    }

    gruppo_corrente = form.gruppo.value;
    numero_prod_selezionati = contaProdottiComparati(form);

    //------------------------------------------------------------------------------Aggiungi
    if(aggiungi){
        //Check gruppo...
        if(gruppo_corrente==''){
            form.gruppo.value = gruppo;
        }else{
            if(gruppo_corrente!=gruppo){
                alert('Hai selezionato prodotti della categoria '+gruppo_corrente+' e prodotti della categoria '+gruppo+'.\nE\' possibile comparare solo prodotti della stessa categoria');
                checkbox.checked = false;//Deseleziono checkbox
                return false;        
            }
        }
        //Aggiungo prodotto 
        var nuovo_elemento = document.createElement("INPUT");
        nuovo_elemento.type = "hidden";
        nuovo_elemento.name = "ricorda_prod[]";
        nuovo_elemento.value = id_prod;
        nuovo_elemento.id = id_prod;
        form.appendChild(nuovo_elemento);
    //---------------------------------------------------------------------------------Togli
    }else{
        var elemento_da_togliere = document.getElementById(id_prod);
        if(elemento_da_togliere){
            elemento_da_togliere.parentNode.removeChild(elemento_da_togliere);
        }
        //Check gruppo
        numero_prod_selezionati = contaProdottiComparati(form);
        if(numero_prod_selezionati<1){
            form.gruppo.value = '';
        }
    }
    scriviProdottiComparati(form);
} 

function checkaProdotti(){
    var elementi_ricorda = document.getElementsByName('ricorda_prod[]');
    var elementi_check = document.getElementsByName('compara_prod[]');
    for(i=0;i<elementi_ricorda.length;i++){
        valore_ricorda = elementi_ricorda[i].value;
        for(k=0;k<elementi_check.length;k++){
            valore_check = elementi_check[k].value;
            if(valore_check==valore_ricorda){
                elementi_check[k].checked=true;
            }
        }
    }
}

function sendComparazione(link){
    document.formComparazione.action = link;
    document.formComparazione.submit();
    return true;
}

function rimuoviProdotto(form,idprod){
    var elementi = form.elements;
    for(i=0;i<elementi.length;i++){
        elemento = elementi[i];
        value = elemento.value;
        nome = elemento.name;
        if((nome=='ricorda_prod[]')&&(value==idprod)){
            //elemento.value ='';
		form.removeChild(elemento);
        }
    }
    form.submit();
    return false;
}

function rimuoviProdotto2(form,idprod){
    var elementi = form.prodotti.value.split(';');
    var rimasti = new Array();
    for(i=0;i<elementi.length;i++){
	if(elementi[i]!=idprod){
		rimasti.push(elementi[i]);
	}
    }
    if(rimasti.length>0){
	form.prodotti.value = rimasti.join(';');
    }else{
    	form.removeChild(form.prodotti);
    }
    form.submit();
    return false;
}


function scriviNumero(form,gruppo,check){

}

function replaceImg(new_path){
    if(new_path!=''){
        //alert(new_path);
        document.foto_big.src=new_path;    
    } 
}

function inviaFiltri(element){
    var link = element.value;
    //alert(link);
    document.location.href=link;
}

function contaClickCategoria(idcateg){
    var url = "/aumentaClick.php?id="+idcateg;
    callUrl(url);
}

function createUrl(home_path,error_msg){

    var key = Trim(document.formRicerca.keyword.value);

    if(key!=''){
        key = key.toLowerCase();
        key = key.replace(/\//g,' ');
        key = key.replace(/\\/g,' ');
        key = key.replace(/,/g,' ');
        key = key.replace(/-/g,' ');

        key = key.replace(/[\']/g,'');
        key = key.replace(/[\"]/g,'');

        while (key.indexOf("  ") != -1){
            key = key.substring(0,key.indexOf("  "))+" "+key.substring((key.indexOf("  ")+2),key.length);
        }

        key = key.replace(/ /g,'_');
        /*
        key = key.replace(/_/g,'-');
        */
        //var gruppo = document.formRicerca.gruppo_cercato.value;
        var gruppo='';
        var url = "";
        if(gruppo!=''){
            url += gruppo+'/';
        }
        /*
        url += "<?=$prodotti_web_home_path?>/"+key+".html";
        */
        url += home_path+"/"+key+".html";
        document.formRicerca.action=url;
        return true;
    }else{
        var msg = error_msg;
        var div = document.getElementById('mostraMessaggio');
        div.innerHTML = "<div align=\"center\"><div id=\"messageneg\"><p>"+msg+"</p></div></div>";
        window.scrollTo(0,0);
        return false;
    }
}

function callUrl(url){
var xmlhttp=false;

 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
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", url,true);
xmlhttp.send(null)

}

function msgErrore(key,msg){
    if(key==''){
        //var div = document.getElementById('mostraMessaggio');
        //div.innerHTML = "<div align=\"center\"><div id=\"messageneg\"><p>"+msg+"</p></div></div>";
	    //w_alert('header','Devi specificare un parametro di ricerca', "300", "-200", "50%", "0px");
	    w_alert('header','Devi specificare un parametro di ricerca', "300", "-340", "70%", "30%");
        window.scrollTo(0,0);
        return false;
    }else{
        return true;
    }   
}

function track_click(id,id_tz,cat){
    var url = "/contaClickDada.php";
    if((id!='')&&(id_tz!='')&&(cat!='')){
        url += '?id='+id+'&id_tz='+id_tz+'&cat='+cat;
    }
    callUrl(url);
}

function track_click_zed(id,id_tz,cat){
    var url = "/contaClickZed.php";
    if((id!='')&&(id_tz!='')&&(cat!='')){
        url += '?id='+id+'&id_tz='+id_tz+'&cat='+cat;
    }
    callUrl(url);
}

function Trim(TRIM_VALUE){
if(TRIM_VALUE.length < 1){
return"";
}
TRIM_VALUE = RTrim(TRIM_VALUE);
TRIM_VALUE = LTrim(TRIM_VALUE);
if(TRIM_VALUE==""){
return "";
}
else{
return TRIM_VALUE;
}
} //End Function

function RTrim(VALUE){
var w_space = String.fromCharCode(32);
var v_length = VALUE.length;
var strTemp = "";
if(v_length < 0){
return"";
}
var iTemp = v_length -1;

while(iTemp > -1){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(0,iTemp +1);
break;
}
iTemp = iTemp-1;

} //End While
return strTemp;

} //End Function

function LTrim(VALUE){
var w_space = String.fromCharCode(32);
if(v_length < 1){
return"";
}
var v_length = VALUE.length;
var strTemp = "";

var iTemp = 0;

while(iTemp < v_length){
if(VALUE.charAt(iTemp) == w_space){
}
else{
strTemp = VALUE.substring(iTemp,v_length);
break;
}
iTemp = iTemp + 1;
} //End While
return strTemp;
} //End Function

//Funzione per nascondere testo...
function mostra(obj) {
    var el = document.getElementById(obj);
    if ( el.style.display != "none" ) {
        el.style.display = 'none';
        document.getElementById("plus_minus").innerHTML = "+";
    }
    else {
        el.style.display = '';
        document.getElementById("plus_minus").innerHTML = "-";
    }
}

function limite(zone,max)
{
if(zone.value.length>=max){zone.value=zone.value.substring(0,max);}
}

//Funizone per mostrare titolo videogallery...
function showVideogalleryTitle(id){
    var elemento_title = document.getElementById('video_'+id);
    var title = elemento_title.innerHTML;
    var elemento_show = document.getElementById('showtitle');
    elemento_show.innerHTML = "<p class=\"font11\">"+title+"</font>";
}

function removeVideogalleryTitle(){
    var elemento_show = document.getElementById('showtitle');
    elemento_show.innerHTML = "<p class=\"font11\">Clicca sulla preview per vedere il video</font>";
}

function switch_tab(tab_object){
        var tab_object = tab_object;
        var content_object = document.getElementById(tab_object.id+"-cnt");
        var parent_object = document.getElementById(tab_object.parentNode.id);
    	var tabs = parent_object.getElementsByTagName("li");
        for (var i = 0; i < tabs.length; i++) {
                var thisTab = tabs[i];
                if (thisTab.id) {
	        	var other_content_object = document.getElementById(thisTab.id+"-cnt");
        	        other_content_object.style.display = 'none';
                	var other_tab_object = document.getElementById(thisTab.id);
                        other_tab_object.className = "tabs";
                }
        }
        tab_object.className = "tabs sel";
        content_object.style.display = 'block';
}

function ApriChiudi(tab,id) {
    if (document.getElementById("list"+tab+"-txt"+id).style.display!="block") {
        document.getElementById("list"+tab+"-txt"+id).style.display="block";
        document.getElementById("ico-piu-"+tab+"-"+id).src="/images/ico-meno.png";
    }else {
        document.getElementById("list"+tab+"-txt"+id).style.display="none";
        document.getElementById("ico-piu-"+tab+"-"+id).src="/images/ico-piu.png";
    }
}

function ApriChiudiH1() {
	if (document.getElementById("subH1").style.display!="block") {
	        document.getElementById("subH1-intro").style.display="none";
        	document.getElementById("subH1").style.display="block";
        }else{
        	document.getElementById("subH1").style.display="none";
        	document.getElementById("subH1-intro").style.display="block";
    	}
}

function members(tipo_azione){
    //Variabili...
    var destinazione = '';
    var ritorno1 = '';
    var ritorno2 = '';
    var tipo_action = '';
    var url_corrente = location.protocol+'//'+location.hostname+location.pathname;
    if(location.hostname=='forum.tecnozoom.it'){
        url_corrente = forum_home;
    }
    var email = ''; 
    var spedisci = true;
//Gestione parametro...
    switch(tipo_azione){
        case 'login' : 
            destinazione = community_home+'login.php';
            ritorno1 = url_corrente;
        break;

        case 'logout' :
            destinazione = community_home+'logout.php';
            ritorno1 = url_corrente;
        break;

        case 'register' :
            destinazione = community_home+'registrazione.php?r=url_corrente';
            ritorno1 = url_corrente;
            ritorno2 = url_corrente;
        break;

        case 'update' :
                if(loggato){
                        destinazione = forum_home+'prefs.php';
                        tipo_action = 'updateuser';
                        ritorno1 = url_corrente;
                        ritorno2 = url_corrente;
                }else{
                        destinazione = community_home+'login.php';
                        ritorno1 = url_corrente;
                        ritorno2 = url_corrente;    
                }
        break;
	case 'scriviopinione' :
            stringid = arguments[1];//Opzionale
            gruppo = arguments[2];//Opzionale
            if(loggato){
                //In questo caso la funzione deve anche settare gruppo,stringid e id_cat...
                idcat = arguments[3];//Opzionale
                if((stringid!='')&&(stringid!=undefined)){
                    document.memberForm.stringid.value = stringid;
                }
                if((gruppo!='')&&(gruppo!=undefined)){
                    document.memberForm.gruppo.value = gruppo;
                }
                if((idcat!='')&&(idcat!=undefined)){
                    document.memberForm.id_categ.value = idcat;
                }
                destinazione = '/scriviOpinione.html';
                ritorno1 = url_corrente;
            }else{
                if((gruppo!='')&&(gruppo!=undefined)){
                    //Dopo il login indirizzo verso pagina opinioni...
                    ritorno1 = location.protocol+'//'+location.hostname+'/'+gruppo+'/recensioni-utenti-'+stringid+'.html';
                }else{
                    ritorno1 = link_opi;
                }
                destinazione = community_home+'login.php';
            }
        break;

        case 'scriviopinione_test' :
            stringid = arguments[1];//Opzionale
            gruppo = arguments[2];//Opzionale
            if(loggato){
                //In questo caso la funzione deve anche settare gruppo,stringid e id_cat...
                idcat = arguments[3];//Opzionale
                if((stringid!='')&&(stringid!=undefined)){
                    document.memberForm.stringid.value = stringid;
                }
                if((gruppo!='')&&(gruppo!=undefined)){
                    document.memberForm.gruppo.value = gruppo;
                }
                if((idcat!='')&&(idcat!=undefined)){
                    document.memberForm.id_categ.value = idcat;
                }
                destinazione = '/scriviOpinione_old.html';
                ritorno1 = url_corrente;
            }else{
                if((gruppo!='')&&(gruppo!=undefined)){
                    //Dopo il login indirizzo verso pagina opinioni...
                    ritorno1 = location.protocol+'//'+location.hostname+'/'+gruppo+'/recensioni-utenti-'+stringid+'.html';
                }else{
                    ritorno1 = link_opi;
                }
                destinazione = community_home+'login.php';
            }
        break;
    
	 case 'richiedirecensione' :
            destinazione = '/richiediRecensione.php';
                if(loggato){
                        email = email_user;
                }else{
                //Recupera email da input text...
                        email = document.myform.email.value;
			if(!validateEmail(email)){
                        //if(email==''){
				w_alert('richiedirecensione','Inserire un indirizzo email corretto', "300", "-100", "50%", "30%");
        			window.scrollTo(0,0);
                                spedisci = false;
                        }
                }
        break;
	case 'richiedivideorecensione' :
            destinazione = '/richiedivideoRecensione.php';
                if(loggato){
                        email = email_user;
                }else{
                        //Recupera email da input text...
                        email = document.myform.email.value;
                        if(email==''){
			w_alert('richiedivideorecensione','Inserire un indirizzo email', "300", "-200", "50%", "30%");
                                window.scrollTo(0,0);
                        spedisci = false;
                        }
                }
        break;

        case 'richiedimanuale' :
            destinazione = '/richiediManuale.php';
                if(loggato){
                        email = email_user;
                }else{
                        //Recupera email da input text...
                        email = document.myform.email.value;
                        if(email==''){
			w_alert('richiedimanuale','Inserire un indirizzo email', "300", "-200", "50%", "30%");
                        window.scrollTo(0,0);
                        spedisci = false;
                        }
                }
        break;

	}//End Switch

	if(spedisci){
	        //Settaggio form...
        	document.memberForm.r.value=ritorno1;
	        document.memberForm.rs.value=ritorno2;
        	document.memberForm.url_precedente.value=ritorno1;
	        document.memberForm.email.value=email;
        	campo_action = document.getElementById('tipo_azione');
	        campo_action.value=tipo_action;
        	campo_action.name='action';
	        //document.memberForm.action=destinazione;
		document.memberForm.setAttribute('action',destinazione);
        	document.memberForm.submit();
	    }
}

function clearInput(id){
	var element = document.getElementById(id);
	element.value='';
}

function sposta(id_div_parent,blocco_da_visualizzare,div_freccia,totali){
	//gestione tabs
	var parent_object = document.getElementById(id_div_parent);
	if(parent_object){
		var blocchi = parent_object.getElementsByTagName("div");
		var conta_div = 0;
                for (var i = 0; i < blocchi.length; i++) {
			var id_elem_corrente = blocchi[i].id;
			if(id_elem_corrente.indexOf(id_div_parent)!==-1){
				if(conta_div == blocco_da_visualizzare){
					blocchi[i].style.display='';
				}else{
					blocchi[i].style.display='none';
				}
				conta_div++;
			}
		}
	}
	//Gestione freccie
	elem_freccia_indietro = document.getElementById(div_freccia+'_indietro');
	elem_freccia_indietro_grey = document.getElementById(div_freccia+'_indietro_grey');
	if(elem_freccia_indietro){
		if(blocco_da_visualizzare<1){
			elem_freccia_indietro.style.display = 'none';
			elem_freccia_indietro_grey.style.display = '';
		}else{
			elem_freccia_indietro.style.display = '';
			elem_freccia_indietro_grey.style.display = 'none';
		}
	}
	elem_freccia_avanti = document.getElementById(div_freccia+'_avanti');
	elem_freccia_avanti_grey = document.getElementById(div_freccia+'_avanti_grey');
        if(elem_freccia_avanti){
                if(blocco_da_visualizzare>=(totali-1)){
                        elem_freccia_avanti.style.display = 'none';
			elem_freccia_avanti_grey.style.display = '';
                }else{
			elem_freccia_avanti.style.display = '';
			elem_freccia_avanti_grey.style.display = 'none';
		}
        }
}

function filtra_listing_prodotti(){
	select = document.getElementById('select_filtra_listing');
    label = document.getElementById('label_selezionata');
    valore_label = label.value;
	if(select){
		gruppo = select.options[select.selectedIndex].value;
	}else{
		gruppo ='';
	}
	if(gruppo!=''){
		if(gruppo!='current'){
			tasto = document.getElementById('tasto_filtra');
			if(tasto){
				//nuovo_contenuto = "<p>Attendere...</p>";
				//tasto.innerHTML = nuovo_contenuto;
			}
			var url = '/filtra_listing_modelli.html';
		    var pars = 'gruppo='+gruppo+'&label='+valore_label;
		    var netAjax = new Ajax.Request( url, { method: 'get', parameters: pars, asynchronous: false, onComplete: ajaxResponse });
			elem = document.getElementById('box_listing_homepage');
			elem.innerHTML = remote_response;
            if(label!=1){
                var id_tab_da_evidenziare = 'tabRec'+valore_label;
                var elemento_da_evidenziare = document.getElementById(id_tab_da_evidenziare);
                switch_tab(elemento_da_evidenziare);
                elemento_da_evidenziare.blur();
            }
		}
	}else{	
		elem = document.getElementById('box_listing_homepage');
		elem.innerHTML = html_listing_orig;
	}
}	

function filtri_ajax(modulo,layout,marca,gruppo,url_senza/*,titolo_grande,titolo_piccolo,parametri*/){
	var element_div = document.getElementById('filtri_ajax');
	var url = '/filtri_layout_ajax.html';
	var pars = 'modulo_principale='+modulo+'&tipo_layout='+layout+'&nome_marca='+marca+'&gruppo_richiesto='+gruppo+'&url_senza_html='+url_senza;/*+'&titolo_grande='+titolo_grande+'&titolo_piccolo='+titolo_piccolo+'&parametri='+parametri;*/
	var netAjax = new Ajax.Request( url, { method: 'post', parameters: pars, asynchronous: false, onComplete: ajaxResponse });
	element_div.innerHTML = remote_response;
}

function ebay_ajax(id_modello,div,modulo,tipologia_accessori,memory_card){
	var url = '/ebay_ajax.html';
	if(id_modello!='' && div!=''){
	        var pars = 'id_modello='+id_modello;
		if(modulo!='')
			pars+='&modulo='+modulo;
		if(tipologia_accessori!='')
                        pars+='&tipo='+tipologia_accessori;
		if(memory_card!='')
                        pars+='&memory_card='+memory_card;
		var elem = document.getElementById(div);
        	var netAjax = new Ajax.Request( url, { method: 'get', parameters: pars, asynchronous: false, onComplete: ajaxResponse });
	      	//elem.innerHTML = remote_response;
	}
}

function addProContro(id_categ,nome,tipo){
    var url = '/inserisciProContro.php';
    if( id_categ!='' && nome!='' && tipo!=''){
        var pars = 'nome_car='+nome+'&tipo='+tipo+'&id_categ='+id_categ;
        var netAjax = new Ajax.Request( url, { method: 'post', parameters: pars, asynchronous: false, onComplete: ajaxResponse });
        if(remote_response!=''){
            if(tipo=='P'){
                var elemento = document.getElementById('lista_pro');
                try {
                    var checkbox = document.createElement("<INPUT name='pro[]' class='checkbox' checked />");
                } catch (e) {
                    var checkbox = document.createElement("INPUT");
                    checkbox.name = "pro[]";
                    checkbox.checked = "true";
                }
                checkbox.type = "checkbox";
                checkbox.value=remote_response;
            }else{
                var elemento = document.getElementById('lista_contro');
                try {
                    var checkbox = document.createElement("<INPUT name='contro[]' class='checkbox' checked />");
                } catch (e) {
                    var checkbox = document.createElement("INPUT");
                    checkbox.name = "contro[]";
                    checkbox.checked = "true";
                }
                checkbox.type = "checkbox";
                checkbox.value=remote_response;
            }
            label = document.createTextNode(" "+nome);
            elemento.appendChild(checkbox);
            elemento.appendChild(label);
            elemento.appendChild(document.createElement("br"));
        }
    }   
    return false; 
}

function filtra_listing_prodotti_marca(){
    elem_gruppo = document.getElementById('gruppo_prodotti');
    elem_id_categ = document.getElementById('id_categ_prodotti');
    elem_stringid = document.getElementById('stringid_prodotti');
    gruppo = elem_gruppo.value;
    id_categ = elem_id_categ.value;
    stringid=elem_stringid.value;
    select = document.getElementById('select_filtra_listing');  
    if(select){
        tipo_filtro = select.options[select.selectedIndex].value;
    }else{
        tipo_filtro ='';
    }
    if(tipo_filtro!=''){
        if(tipo_filtro!='current'){
            var url = '/filtra_listing_modelli_marca.html';
            var pars = 'gruppo='+gruppo+'&id_categ='+id_categ+'&tipo_filtro='+tipo_filtro+"&stringid="+stringid;    
            var netAjax = new Ajax.Request( url, { method: 'get', parameters: pars, asynchronous: false, onComplete: ajaxResponse });
            elem = document.getElementById('listing_prodotti');
            elem.innerHTML = remote_response;
        }
    }else{
        elem = document.getElementById('listing_prodotti');
        elem.innerHTML = html_listing_orig;
    }
}


function filtra_listing_opinioni(ordinamento,id,stringid,gruppo,pagina){
    if(ordinamento!='' && id!='' && stringid!='' && gruppo!=''){
            var url = '/filtra_listing_opinioni.html';
            var pars = 'ordinamento='+ordinamento;
            pars += '&id_categoria='+id;
            pars += '&stringid_tecnozoom='+stringid;
            pars += '&gruppo_tecnozoom='+gruppo;
            pars += '&pagina_corrente='+pagina;
            var netAjax = new Ajax.Request( url, { method: 'post', parameters: pars, asynchronous: false, onComplete: ajaxResponse });
            elem = document.getElementById('listing_opinioni');
            elem.innerHTML = remote_response;
    }
}   

var remote_response;

function ajaxResponse(originalRequest) {
    remote_response = originalRequest.responseText;
}

function recuperaModelli_old(elem_id,search,gruppo,marca){
	var url = '/quicksearch_recupera_modelli.html';
	if(search!=''){
		var pars = 'search='+search;
		if(gruppo!=''){
			pars += '&gruppo='+gruppo;
		}
		if(marca!=''){
			pars += '&marca='+marca;
		}
		if(elem_id!=''){
			var elem = document.getElementById(elem_id);
			var netAjax = new Ajax.Request( url, { method: 'post', parameters: pars, asynchronous: false, onComplete: ajaxResponse });
			elem.innerHTML = remote_response;
		}
	}
}

function recuperaModelli(elem_id,search,gruppo,marca){
    var url = '/quicksearch_recupera_modelli.html';
    elem = document.getElementById(elem_id);
    elem.options.length = 0;
    if(search!=''){
        var pars = 'search='+search;
        if(gruppo!=''){
            pars += '&gruppo='+gruppo;
        }
        if(marca!=''){
            pars += '&marca='+marca;
        }
        if(elem_id!=''){
            var netAjax = new Ajax.Request( url, { method: 'post', parameters: pars, asynchronous: false, onComplete: ajaxResponse });
            var valori_options = remote_response.split('\n');
            for (i=0; i<(valori_options.length-1); i++) {
                dati_option = valori_options[i].split('|');
                id = dati_option[0];
                label = dati_option[1];
                selected = dati_option[2];
                var pOption=document.createElement("OPTION");
                pOption.value=id;
                pOption.text=label;
                pOption.selected = selected;
                elem.options.add(pOption);
            }
        }
    }
}


function abilita_disabilita_radio_quick(modello_selected){
	if(modello_selected==''){
		//disabilito
		elem = document.getElementById('radio_scheda');
		elem.disabled = true;
		elem = document.getElementById('radio_listing');
        elem.disabled = true;
		elem = document.getElementById('radio_accessori');
        elem.disabled = true;
	}else{
		//abilito
		elem = document.getElementById('radio_scheda');
        elem.disabled = false;
		elem = document.getElementById('radio_listing');
        elem.disabled = false;
		elem = document.getElementById('radio_accessori');
        elem.disabled = false;
	}
}

function addbookmark(bookmarkurl,bookmarktitle){
	if (document.all)
		window.external.AddFavorite(bookmarkurl,bookmarktitle);
}

function homepage(url) { 
	if(document.all)
	//document.body.style.behavior='url(#default#homepage)';
	document.body.setHomePage(url);
}

function validateQuick(form){
	if(form){
		if((form.gruppo_quick.value!='')){
			form.submit();
		}else{
			w_alert('quicksearch_box', 'Devi selezionare almeno un tipo',"300", "-50", "50%", "30%");
		}
	}
}

function desidera(id_prod){
	var url = 'http://www.tecnozoom.it/desidera.html';
	var pars = 'idproduct='+id_prod;
	var netAjax = new Ajax.Request( url, { method: 'get', parameters: pars, asynchronous: false, onComplete: ajaxResponse });
	window.location.reload();
	/*
	var url = community_path+'ajax_php/whishes_product.php';
	var pars = 'rnd='+Math.random()+'&idproduct='+id_prod;
	var netAjax = new Ajax.Request( url, { method: 'get', parameters: pars, asynchronous: false, onComplete: ajaxResponse });
	w_alert('possiedi_desideri','Parere registrato','155', '-80', '50%', '20%')
	*/
}

function possiedi(id_prod){
	var url = 'http://www.tecnozoom.it/possiede.html';
        var pars = 'idproduct='+id_prod;
        var netAjax = new Ajax.Request( url, { method: 'get', parameters: pars, asynchronous: false, onComplete: ajaxResponse });
        window.location.reload();
	/*
	var url = community_path+'ajax_php/owns_product.php';
        var pars = 'rnd='+Math.random()+'&idproduct='+id_prod;
        var netAjax = new Ajax.Request( url, { method: 'post', parameters: pars, asynchronous: false, onComplete: ajaxResponse });
        if(remote_response!=1){
                alert('Si e\' verificato un problema'+remote_response);
        }else{
                alert('Regstrazione scelta effettuata');
        }
	*/
}

function esprimi_giudizio(id_categ,id_post,giudizio){
    if(id_categ!='' && id_post!='' && giudizio!=''){
        var url = "/giudizi_opinioni.php";
        var pars = "categ="+id_categ+"&post="+id_post+"&giudizio="+giudizio;
        var netAjax = new Ajax.Request( url, { method: 'get', parameters: pars, asynchronous: false, onComplete: ajaxResponse });
        if(remote_response!=1){
                w_alert('utile','Parere registrato');
        }else{
                w_alert('utile','Hai gia\' espresso un parere su questa opinione');
        }
    }
}


function valida_scrivi_opinione_new(form){
    //Campi obbligatori
    if(form.titolo.value==''){
        w_alert('form_scrittura_opinione','Il campo titolo e\' obbligatorio');
        return false;
    }
    if(form.commento.value==''){
                w_alert('form_scrittura_opinione','Il campo opinione e\' obbligatorio');
        return false;
        }else{
        var parole = Array();
        var commento = form.commento.value;
        parole = commento.split(' ');
        if(parole.length<20){
            w_alert('form_scrittura_opinione','Il testo deve essere di almeno 20 parole');
            return false;
        }
    }
    var pro = Array();
    var contro = Array();
    for (i = 1; i < 10; i++){
        var nome_pro = 'pro_'+i;
        var nome_contro = 'contro_'+i;
        var elem_pro = document.getElementById(nome_pro);
        var elem_contro = document.getElementById(nome_contro);
	var numero_totale_pro = 0;
	var numero_totale_contro = 0;
        if(elem_pro){
	    numero_totale_pro++;
            var valore_pro = elem_pro.checked;
            if(valore_pro){
                pro[pro.length] = valore_pro;
            }
        }
        if(elem_contro){
	    numero_totale_contro++;
            var valore_contro = elem_contro.checked; 
            if(valore_contro){
                contro[contro.length] = valore_contro;
            }
        }
    }
    if(numero_totale_pro>0){
	    if(pro.length<1){
        	w_alert('form_scrittura_opinione','Devi inserire almeno 1 pro');
        	return false;
    		}
    }
    if(numero_totale_contro>0){
	    if(contro.length<1){
                w_alert('form_scrittura_opinione','Devi inserire almeno 1 contro');
        	return false;
            }
    }
    return true;
}


function valida_scrivi_opinione(form){
	//Campi obbligatori
	if(form.titolo.value==''){
		w_alert('form_scrittura_opinione','Il campo titolo e\' obbligatorio');
		return false;
	}
	if(form.commento.value==''){
                w_alert('form_scrittura_opinione','Il campo opinione e\' obbligatorio');
		return false;
        }else{
		var parole = Array();
		var commento = form.commento.value;
		parole = commento.split(' ');
		if(parole.length<20){
			w_alert('form_scrittura_opinione','Il testo deve essere di almeno 20 parole');
			return false;
		}
	}
	var campi_pro = document.getElementsByName('pro[]');
	var campi_contro = document.getElementsByName('contro[]');
	if(campi_pro.length<3){
		w_alert('box_procontro','Per proseguire e\' necessario esprimere la propria preferenza per almeno 3 pro e 3 contro',"300", "50%", "50%", "30%");
		return false;
	}
	if(campi_contro.length<3){
                w_alert('box_procontro','Per proseguire e\' necessario esprimere la propria preferenza per almeno 3 pro e 3 contro',"300", "-200", "50%", "30%");
		return false;
        }
	return true;
}

function clearUser(user, defaultValue) {
   if (user.value == defaultValue)
   {
      user.value = '';
      user.style.color= '#333333';
   }
}
function clearPwd(pwd, defaultValue) {
   if (pwd.value == defaultValue)
   {
      pwd.value = '';
      pwd.style.color= '#333333';
   }
}

function captchaResponse(originalRequest) {
    netCaptcha = originalRequest.responseText;
}


function votaProContro(voto,id,vecchio_voto){
    if(voto!=''){
        var url = '/procontro/ajax_php/vota.php';
        var pars = "id="+id+"&voto="+voto+"&piattaforma=ProControTzit";
        var netAjax = new Ajax.Request( url, { method: 'post', parameters: pars, asynchronous: false, onComplete: captchaResponse });
        var nuovo_voto = parseInt(vecchio_voto);
        if(voto=='yes'){
            nuovo_voto++;
        }else{
            nuovo_voto--;
        }
        if(isNaN(nuovo_voto)){
                //alert(vecchio_voto);
                nuovo_voto = vecchio_voto;
        }
        if(nuovo_voto>0){
            nuovo_voto = '+'+nuovo_voto
        }
        var elemento_voti = document.getElementById('bcmt-vote-'+id);
        var html = "<p><span class=\"voted\">&nbsp;Votato&nbsp;</span><span>"+nuovo_voto+" </span></p>";
        elemento_voti.innerHTML = html;
    }
}

function votaNuoviProContro(voto,id,vecchio_voto){
    if(voto!=''){
        var url = '/procontro/ajax_php/vota_nuovo.php';
        var pars = "id="+id+"&voto="+voto+"&piattaforma=ProControTzit";
        var netAjax = new Ajax.Request( url, { method: 'post', parameters: pars, asynchronous: false, onComplete: captchaResponse });
        var nuovo_voto = parseInt(vecchio_voto);
	var elemento_img_up = document.getElementById('img-vote-up-'+id);
	var elemento_img_down = document.getElementById('img-vote-down-'+id);
	var img_up_off = '/images/ico_up_off.png';
	var img_up_on = '/images/ico-up.png';
	var img_down_off = '/images/ico_down_off.png';
	var img_down_on = '/images/ico-down.png';
	var elemento_link_up = document.getElementById('link-vote-up-'+id);
	var elemento_link_down = document.getElementById('link-vote-down-'+id);
        if(voto=='yes'){ 
            nuovo_voto++;
	    elemento_img_up.src=img_up_off;
	    elemento_link_up.onclick=function() { rimuoviVoto('yes',id,vecchio_voto);return false;};	
	    elemento_img_down.src = img_down_on;
	    elemento_link_down.onclick=function() { votaNuoviProContro('no',id,vecchio_voto);return false;};
        }else{
            nuovo_voto--;
	    elemento_img_up.src=img_up_on;
	    elemento_link_up.onclick=function() { votaNuoviProContro('yes',id,vecchio_voto);return false;};
            elemento_img_down.src = img_down_off;
	    elemento_link_down.onclick=function() { rimuoviVoto('no',id,vecchio_voto);return false;};
        }
        if(isNaN(nuovo_voto)){
                //alert(vecchio_voto);
                nuovo_voto = vecchio_voto;
        }
        if(nuovo_voto>0){
            nuovo_voto = '+'+nuovo_voto
        }
	
	var elemento_voto = document.getElementById('voto-vote-'+id);
	elemento_voto.innerHTML = nuovo_voto;
    }
}

function votaNuoviProControOpinione(voto,id,vecchio_voto,tipo){
    if(voto!=''){
        var url = '/procontro/ajax_php/vota_nuovo.php';
        var pars = "id="+id+"&voto="+voto+"&piattaforma=ProControTzit";
        var netAjax = new Ajax.Request( url, { method: 'post', parameters: pars, asynchronous: false, onComplete: captchaResponse });
        var nuovo_voto = parseInt(vecchio_voto);
        var elemento_img_up = document.getElementById('img-vote-up-'+id);
        var elemento_img_down = document.getElementById('img-vote-down-'+id);
        var img_up_off = '/images/ico_up_off.png';
        var img_up_on = '/images/ico-up.png';
        var img_down_off = '/images/ico_down_off.png';
        var img_down_on = '/images/ico-down.png';
        var elemento_link_up = document.getElementById('link-vote-up-'+id);
        var elemento_link_down = document.getElementById('link-vote-down-'+id);
	/*
	* Creo campo hidden con id procontro votato
	*/
	var form_opinione = document.formOpinioni;
	var campo_hidden = document.createElement("input");
	campo_hidden.setAttribute('type','hidden');
	if(tipo=='pro'){
		campo_hidden.setAttribute('name','pro[]');
		campo_hidden.setAttribute('id','pro_'+id);
	}else{
		campo_hidden.setAttribute('name','contro[]');
		campo_hidden.setAttribute('id','contro_'+id);
	}
	campo_hidden.setAttribute('value',id);
	form_opinione.appendChild(campo_hidden);
        if(voto=='yes'){
            nuovo_voto++;
            elemento_img_up.src=img_up_off;
            elemento_link_up.onclick=function() { rimuoviVoto('yes',id,vecchio_voto);return false;};
            elemento_img_down.src = img_down_on;
            elemento_link_down.onclick=function() { votaNuoviProContro('no',id,vecchio_voto);return false;};
        }else{
            nuovo_voto--;
            elemento_img_up.src=img_up_on;
            elemento_link_up.onclick=function() { votaNuoviProContro('yes',id,vecchio_voto);return false;};
            elemento_img_down.src = img_down_off;
            elemento_link_down.onclick=function() { rimuoviVoto('no',id,vecchio_voto);return false;};
        }
        if(isNaN(nuovo_voto)){
                //alert(vecchio_voto);
                nuovo_voto = vecchio_voto;
        }
        if(nuovo_voto>0){
            nuovo_voto = '+'+nuovo_voto
        }

        var elemento_voto = document.getElementById('voto-vote-'+id);
        elemento_voto.innerHTML = nuovo_voto;
    }
}


function rimuoviVoto(voto,id,vecchio_voto){
	var url = '/procontro/ajax_php/cancellavoto.php';
        var pars = "id="+id+"&voto="+voto+"&piattaforma=ProControTzit";
        var netAjax = new Ajax.Request( url, { method: 'post', parameters: pars, asynchronous: false, onComplete: captchaResponse });
        var nuovo_voto = parseInt(vecchio_voto);
	var img_up_on = '/images/ico-up.png';
	var img_down_on = '/images/ico-down.png';
	var elemento_img_up = document.getElementById('img-vote-up-'+id);
        var elemento_img_down = document.getElementById('img-vote-down-'+id);
	var elemento_link_up = document.getElementById('link-vote-up-'+id);
        var elemento_link_down = document.getElementById('link-vote-down-'+id);
	elemento_img_up.src=img_up_on;
	elemento_link_up.onclick=function() { votaNuoviProContro('yes',id,vecchio_voto);return false;};
	elemento_img_down.src = img_down_on;
	elemento_link_down.onclick=function() { votaNuoviProContro('no',id,vecchio_voto);return false;};
	

	if(isNaN(nuovo_voto)){
                //alert(vecchio_voto);
                nuovo_voto = vecchio_voto;
        }
        if(nuovo_voto>0){
            nuovo_voto = '+'+nuovo_voto
        }
	var elemento_voto = document.getElementById('voto-vote-'+id);
        elemento_voto.innerHTML = nuovo_voto;
}

function rimuoviVotoOpinione(voto,id,vecchio_voto){
        var url = '/procontro/ajax_php/cancellavoto.php';
        var pars = "id="+id+"&voto="+voto+"&piattaforma=ProControTzit";
        var netAjax = new Ajax.Request( url, { method: 'post', parameters: pars, asynchronous: false, onComplete: captchaResponse });
        var nuovo_voto = parseInt(vecchio_voto);
        var img_up_on = '/images/ico-up.png';
        var img_down_on = '/images/ico-down.png';
        var elemento_img_up = document.getElementById('img-vote-up-'+id);
        var elemento_img_down = document.getElementById('img-vote-down-'+id);
        var elemento_link_up = document.getElementById('link-vote-up-'+id);
        var elemento_link_down = document.getElementById('link-vote-down-'+id);
        elemento_img_up.src=img_up_on;
        elemento_link_up.onclick=function() { votaNuoviProContro('yes',id,vecchio_voto);return false;};
        elemento_img_down.src = img_down_on;
        elemento_link_down.onclick=function() { votaNuoviProContro('no',id,vecchio_voto);return false;};

	var campo_hidden = document.getElementById('pro_'+id);
        if(campo_hidden){
                campo_hidden.value='';
        }
        campo_hidden = document.getElementById('contro_'+id);
        if(campo_hidden){
                campo_hidden.value='';
        }


        if(isNaN(nuovo_voto)){
                //alert(vecchio_voto);
                nuovo_voto = vecchio_voto;
        }
        if(nuovo_voto>0){
            nuovo_voto = '+'+nuovo_voto
        }
        var elemento_voto = document.getElementById('voto-vote-'+id);
        elemento_voto.innerHTML = nuovo_voto;
}


function apriProContro(tipo,flag){
	if(tipo=='pro'){
		if(!flag){
			chiudiProContro('contro');
		}
		var button = document.getElementById('button_aggiungi_pro');
		button.className = 'button-off';
	}else{
		if(!flag){
			chiudiProContro('pro');
		}
		var button = document.getElementById('button_aggiungi_contro');
                button.className = 'button-off';
	}
	var div = document.getElementById('aggiungi_'+tipo);
	div.style.visibility= "visible";
}
function chiudiProContro(tipo,flag){
	if(tipo=='pro'){
		if(flag){	
			var textfield = document.getElementById('valore_pro');
			textfield.value = '';
		}
		var button = document.getElementById('button_aggiungi_pro');
                button.className = 'button';
	}else{
		if(flag){	
			var textfield = document.getElementById('valore_contro');
			textfield.value = '';
		}
		var button = document.getElementById('button_aggiungi_contro');
                button.className = 'button';
	}
        var div = document.getElementById('aggiungi_'+tipo);
        div.style.visibility= "hidden";
}

function validateProcontro(tipo){
	var form = document.aggiungi_procontro;
	var ritorno = true;
	if(tipo=='pro'){
		form.valore_contro.value = '';
		if(form.valore_pro.value==''){
			w_alert('aggiungi_pro','Il campo non puo\' essere vuoto',"300", "-450", "50%", "30%");
			ritorno = false;
		}
	}else{
		form.valore_pro.value = '';
		if(form.valore_contro.value==''){
                        w_alert('aggiungi_contro','Il campo non puo\' essere vuoto',"300", "-450", "50%", "30%");
                        ritorno = false;
                }
	}
	if(ritorno){
		document.aggiungi_procontro.submit();
	}
} 

	var videoAttuale = 'orig';
	var div_orig = "";
	function fullScreen(){		
		var elem = document.getElementById('video');
		var button = document.getElementById('buttonHD');
		if(videoAttuale=='orig'){
			var button_img = "/images/ico-hd-on.png";
			var clone = elem.cloneNode(true);
			var container = document.getElementById('box_colonna');
			var container_dest = document.getElementById('content');
			var prima_di = document.getElementById('content-left');
			var nuovo_nome_attr = 'videoObjFull';
			var new_width = 958;
			div_orig = elem;
			videoAttuale = 'full';
			//Ridimensiono il video
			var objVideo = clone.childNodes[1];
			var newObjVideo = ridimensiona(objVideo,958);
		}else{
			var button_img = "/images/ico-hd-off.png";
			var clone = div_orig;
			var container = document.getElementById('content');
			var container_dest = document.getElementById('box_colonna');
			var prima_di = document.getElementById('dopo_orig');
			var nuovo_nome_attr = 'videoOrig';
			videoAttuale = 'orig';
		}
		var attr = clone.getAttributeNode('class');
		attr.value = nuovo_nome_attr;
		container.removeChild(elem);
		container_dest.insertBefore(clone,prima_di);
		button.src= button_img;
	}
	function ridimensiona(obj,new_lenght){
		var obj_width = obj.width;
		if(obj_width){
			var obj_height = obj.height;
			if(obj_height){
				var rapporto = obj_width/new_lenght;
				var new_height = Math.round(obj_height/rapporto);
				obj.width = new_lenght;
				obj.height = new_height;
				var param_tags = obj.getElementsByTagName('param');
				for(var i=0;i<param_tags.length;i++){
					if(param_tags[i].name=='movie'){
						param_tags[i].value+="&amp;hd=1&autoplay=1&ap=%2526fmt%3D22";
					}
				}
				var embed = obj.getElementsByTagName("embed")[0];
				embed.width = new_lenght;
				embed.height = new_height;
				embed.src+="&amp;hd=1&autoplay=1&ap=%2526fmt%3D22"
			}
		}
		return obj;		
	}

function validateEmail(mail){
	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	return reg.test(mail);
}

function getBoxUrl(url_id,par){
        var prefix = "ht"+"tp://w"+"ww";
        var query = "?";
        var urls = new Array();
        urls["kelkoo_laterale"]= prefix+".tec"+"nozoo"+"m.it/b"+"oxoffe"+"rteaj"+"ax.html"+query+"id_cate"+"goria="+par;
        urls["kelkoo_centrale_1"]=prefix+".tec"+"nozoo"+"m.it/b"+"oxoffe"+"rteaj"+"ax.html"+query+"id_cate"+"goria="+par+"&typ"+"e=centra"+"le1";
	urls["kelkoo_centrale_2"]= prefix+".tec"+"nozoo"+"m.it/b"+"oxoffe"+"rteaj"+"ax.html"+query+"id_cate"+"goria="+par+"&typ"+"e=cent"+"rale2";
	urls["kelkoo_centrale_2_cornice"]= prefix+".tec"+"nozoo"+"m.it/b"+"oxoffe"+"rteaj"+"ax.html"+query+"id_cate"+"goria="+par+"&typ"+"e=cent"+"rale2cornice";
	urls["kelkoo_gruppi_laterale"] = prefix+".tec"+"nozoo"+"m.it/b"+"oxoffe"+"rteaj"+"ax.html"+query+"grup"+"po="+par+"&typ"+"e=grup"+"pilater"+"ale";
	urls["ebay_laterale"] = prefix+".tecno"+"zoom.i"+"t/boxo"+"fferteeb"+"ay.h"+"tml"+query+"id_ca"+"tegor"+"ia="+par;
        return urls[url_id];
}


function printIframeKelkoo(url_id,par){
	if(url_id && par){
		url = getBoxUrl(url_id,par);
		jQuery.ajax({
  			url: url,
			async:false,
			context: document.body,
		  	success: function(data){
    				document.write(data);
				
  			}
		});
		/*
		switch(url_id){
			case 'kelkoo_laterale':
				width_iframe = "300px";
		                height_iframe = "310px";
			break;
			case 'kelkoo_centrale_2':
				width_iframe = "430px";
	                        height_iframe = "260px";
			break;
			case 'kelkoo_centrale_2_cornice':
				width_iframe = "462px";
                                height_iframe = "275px";
			break;
			case 'kelkoo_centrale_1':
				width_iframe = "462px";
				height_iframe = "275px";
			break;
			case 'kelkoo_gruppi_laterale':
				width_iframe = "300px";
				height_iframe = "640px";
			break;
		}
		document.write("<iframe width=\""+width_iframe+"\" height=\""+height_iframe+"\" frameborder=\"0\" scrolling=\"no\" src=\""+url+"\"></iframe>");
		*/
	}	
}

function printIframeEbay(url_id,par){
	width_iframe = "300px";
        height_iframe = "310px";
	url = getBoxUrl(url_id,par);
	jQuery.ajax({
                        url: url,
                        async:false,
                        context: document.body,
                        success: function(data){
                                document.write(data);

                        }
                });
	/*
	document.write("<iframe width=\""+width_iframe+"\" height=\""+height_iframe+"\" frameborder=\"0\" scrolling=\"no\" src=\""+url+"\"></iframe>");
	*/
}

function printIframeSostariffe(){
	document.write("<div style=\"padding:0 0 5px 0\">\n");
	document.write("<a target=\"_BLANK\" href=\"htt"+"p://ww"+"w.sost"+"ariff"+"e.it/c"+"onfront"+"o-offerte-adsl/?utm_sou"+"rce=Te"+"cnozo"+"om&utm_med"+"iu"+"m=Bann"+"er&utm"+"_camp"+"aign=A"+"DSL30"+"0x25"+"0v1&r"+"eftyp"+"e=ban"+"ner&so"+"s_api_k"+"ey=UR04"+"snoHlCmHx3RM2Jb8"+"tnIBjUoFACkJB0x8vW"+"3dBZa"+"NZF2i\">\n");
	document.write("<img src=\"ht"+"tp:/"+"/ww"+"w.tecno"+"zoom.i"+"t/images/s"+"os_tariff"+"e_adsl30"+"025"+"0.gi"+"f\" border=\"0\" width=\"300\" height=\"250\">");
	document.write("</a>\n");
	document.write("</div>\n");
}

/*
function printIframeKelkoo2(url_id,par){
        if(url_id && par){
		document.write("<script>url = getBoxUrl('"+url_id+"','"+par+"');</script>");
                document.write("<iframe id=\"iframekelkoolaterale\" width=\"300px\" height=\"310px\" frameborder=\"0\" scrolling=\"no\" src=\"\"></iframe>");
		document.write("<script>document.getElementById('iframekelkoolaterale').src=getBoxUrl('"+url_id+"','"+par+"');</script>");
        }
}
*/

