function checkFieldForgot(){ myforms=document.getElementsByTagName('form'); for(i=0;i 255){ msg +="Troppi caratteri nel campo: Nome \n "; } Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/; var email = document.getElementById("email_nwlt"); if((Filtro.test(email.value)) == false){ msg += "Devi inserire: Email \n "; } if(email.lenght > 255){ msg +="Troppi caratteri nel campo: Email \n "; } if(msg != ""){ alert(msg); }else{ //document.newsletter.submit(); $.post('/inc/addusernews.php',{ nome_nwlt:$('#nome_nwlt').val(), email_nwlt:$('#email_nwlt').val() },function(data){alert(data);}); } } function isObject(a) { return (a && typeof a == 'object'); } function checkFieldReg(mynozio){ if(mynozio==null || mynozio=='undefined') mynozio=false; //alert('mynozio:'+mynozio); try{ var myRequest = null; myRequest = CreateXmlHttpReq(function(){ if (myRequest.readyState == 4 && myRequest.status == 200) { var response=myRequest.responseText; if(response=="ok"){ //loggato non controllo niente return true; }else{ //non loggato , controllo campi obbligatori } } }); myRequest.open("GET","/inc/checklogin.php",false); myRequest.send(null); var response=myRequest.responseText; if(!mynozio && ((response=="ok")||(document.getElementById("name").value == 1))){ //loggato non controllo niente if(isObject(document.getElementById("name")) ){ var name = document.getElementById("name"); if(name.value == ""){ alert("Devi inserire: Nome"); name.focus(); return false; } if(name.length > 255){ alert("Troppi caratteri nel campo: Nome"); name.focus(); return false; } } if(isObject(document.getElementById("surname")) ){ var surname = document.getElementById("surname"); if(surname.value == ""){ alert("Devi inserire: Cognome"); surname.focus(); return false; } if(surname.length > 255){ alert("Troppi caratteri nel campo: Cognome"); surname.focus(); return false; } } if(isObject(document.getElementById("country")) ){ var country = document.getElementById("country"); if(country.selectedIndex == 0){ alert("Devi inserire: Paese"); country.focus(); return false; } } return true; }else{ //non loggato , controllo campi obbligatori if(isObject(document.getElementById("name")) ){ var name = document.getElementById("name"); if(name.value == ""){ alert("Devi inserire: Nome"); name.focus(); return false; } if(name.length > 255){ alert("Troppi caratteri nel campo: Nome"); name.focus(); return false; } } if(isObject(document.getElementById("surname")) ){ var surname = document.getElementById("surname"); if(surname.value == ""){ alert("Devi inserire: Cognome"); surname.focus(); return false; } if(surname.length > 255){ alert("Troppi caratteri nel campo: Cognome"); surname.focus(); return false; } } if(isObject(document.getElementById("country")) ){ var country = document.getElementById("country"); if(country.selectedIndex == 0){ alert("Devi inserire: Paese"); country.focus(); return false; } } if(isObject(document.getElementById("member_name")) ){ var member_name = document.getElementById("member_name"); if(member_name.value == ""){ alert("Devi inserire: Nickname"); member_name.focus(); return false; } if(member_name.length > 255){ alert("Troppi caratteri nel campo: Nickname "); member_name.focus(); return false; } if (eregi("^.*?nozio.*?$",member_name.value)) { alert('Il nickname non può contenere la parola "Nozio"'); member_name.focus(); return false; } } Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/; var email = document.getElementById("email2"); if((Filtro.test(email.value)) == false){ alert("Devi inserire: Email"); email.focus(); return false; } if(email.length > 255){ alert("Troppi caratteri nel campo: Email"); email.focus(); return false; } if(isObject(document.getElementById("tipoutente"))){ var tipoutente = document.getElementById("tipoutente"); if(tipoutente.options[tipoutente.selectedIndex].value == ""){ alert("Devi inserire: Segnalato da"); tipoutente.focus(); return false; } } if(isObject(document.getElementById("password")) ){ var password = document.getElementById("password"); if(password.value == ""){ alert("Devi inserire: Password"); password.focus(); return false; } if(password.length > 255){ alert("Troppi caratteri nel campo: Password"); password.focus(); return false; } } if(isObject(document.getElementById("password")) ){ var confirm_password = document.getElementById("confirm_password"); if(confirm_password.value == ""){ alert("Devi inserire: Conferma password"); confirm_password.focus(); return false; } if(confirm_password.length > 255){ alert("Troppi caratteri nel campo: Conferma password"); confirm_password.focus(); return false; } if(confirm_password.value != password.value){ alert(" Conferma password"); confirm_password.focus(); return false; } } var tot_check = false; if ( ((document.getElementById("del_foto")!=null && document.getElementById("del_foto").checked)) || (document.getElementById("img_profilo_exist")==null || document.getElementById("img_profilo_exist").src=='') ) { if(document.getElementById("immagine")!=null ){ var imm = document.getElementById("immagine").value; if (imm=='') { inputs=document.getElementById("tabella_avatar").getElementsByTagName("input"); for (var i=0;i 255){ alert("Troppi caratteri nel campo: Password"); password.focus(); return false; } var confirm_password = document.getElementById("confirm_password"); if(confirm_password.value == ""){ alert("Devi inserire: Conferma password"); confirm_password.focus(); return false; } if(confirm_password.length > 255){ alert("Troppi caratteri nel campo: Conferma password"); confirm_password.focus(); return false; } return true; } function checkFieldAffiliazione(){ if(!document.getElementById("carta_valori").checked){ alert("Devi accettare: Carta dei Valori"); return false; } if(!document.getElementById("nozio_rank").checked){ alert("Devi accettare: selezione e calcolo del Nozio Rank"); return false; } if(!document.getElementById("privacy_2").checked){ alert("Devi accettare: Condizioni sulla privacy"); return false; } return true; } function checkFieldLogin(){ var username = document.getElementById("username"); if(username.value == ""){ alert("Devi inserire: Email"); username.focus(); return false; } var password = document.getElementById("password"); if(password.value == ""){ alert("Devi inserire: Password"); password.focus(); return false; } } function checkFieldLoginID_element(ID_element){ var username = document.getElementById("username_"+ID_element); if(username.value == ""){ alert("Devi inserire: Username"); username.focus(); return false; } var password = document.getElementById("password_"+ID_element); if(password.value == ""){ alert("Devi inserire: Password"); password.focus(); return false; } return true; } function checkFieldFoto(){ var scheda = document.getElementById("id_sk"); if(scheda.value == ""){ alert("Devi inserire: Cerca il soggetto delle tue foto"); return false; } var image1 = document.getElementById("image1"); if(image1.value == ""){ alert("Devi inserire: Foto"); image1.focus(); return false; } return true; } function checkFieldVideo(){ var scheda = document.getElementById("id_sk"); if(scheda.value == ""){ alert("Devi inserire: Cerca il soggetto del tuo video"); return false; } var title = document.getElementById("title"); if(title.value == ""){ alert("Devi inserire: Titolo"); title.focus(); return false; } var html = document.getElementById("html"); if(html.value == ""){ alert("Devi inserire: Codice html YouTube"); html.focus(); return false; } return true; } function checkFieldIti(){ //if( tinyMCE.getInstanceById( 'testo_guida' ) != null ) tinyMCE.triggerSave(); var nome_cat1 = document.getElementById("nome_cat1"); if(nome_cat1.value == "" || nome_cat1.value=="Scegli la località"){ alert("Devi inserire: Destinazione"); nome_cat1.focus(); return false; } var title = document.getElementById("structure_name"); if(title.value == ""){ alert("Devi inserire: Titolo"); title.focus(); return false; } var testo_guida = document.getElementById("testo_guida"); if(testo_guida.value == ""){ alert("Devi inserire: Testo"); testo_guida.focus(); return false; } return true; } function checkFieldEvent(){ //if( tinyMCE.getInstanceById( 'testo_guida' ) != null ) tinyMCE.triggerSave(); var id_cat1 = document.getElementById("nome_cat1"); if(id_cat1.value == "" || id_cat1.value == "Scegli la località" ){ alert("Devi inserire: Destinazione"); id_cat1.focus(); return false; } var structure_name = document.getElementById("structure_name"); if(structure_name.value == ""){ alert("Devi inserire: Titolo"); structure_name.focus(); return false; } var testo_guida = document.getElementById("testo_guida"); if(testo_guida.value == ""){ alert("Devi inserire: Testo"); testo_guida.focus(); return false; } return true; } function checkField(){ var scheda = document.getElementById("id_sk"); if(scheda.value == ""){ alert("Devi inserire: Cerca il soggetto della tua recensione"); return false; } var nome_cat1 = document.getElementById("nome_cat1"); if(isObject(nome_cat1) && (nome_cat1.value == "" || nome_cat1.value == "Scegli la località")){ alert("Devi inserire: Destinazione"); nome_cat1.focus(); return false; } var month = document.getElementById("month"); if(month.value=="-1" ){ alert("Devi inserire: mese"); month.focus(); return false; } var year = document.getElementById("year"); if(year.value=="-1" ){ alert("Devi inserire: anno"); year.focus(); return false; } var usertype = document.getElementById("usertype"); if(usertype.value == "-1"){ alert("Devi inserire: Tipo di viaggiatore"); return false; } var title = document.getElementById("title"); if(title.value == ""){ alert("Devi inserire: Titolo"); title.focus(); return false; } if(title.length > 255){ alert("Troppi caratteri nel campo: Titolo"); title.focus(); return false; } if((document.getElementById('recsu_15')!=null && document.getElementById('recsu_15').checked)){ var rate = document.getElementById("rate"); if(rate.value == "" || rate.value == "-1"){ alert("Devi inserire: Il tuo giudizio"); return false; } } if(document.getElementById('recsu_not15')!=null && document.getElementById('recsu_not15').checked){ if( document.getElementById('val_rater1')==null && document.getElementById('val_rater2')==null && document.getElementById('val_rater3')==null && document.getElementById('val_rater4')==null && document.getElementById('val_rater5')==null && document.getElementById('val_rater6')==null && document.getElementById('val_rater7')==null){ var rate = document.getElementById("rate"); if(rate.value == "" || rate.value == "-1"){ alert("Devi inserire: Il tuo giudizio"); return false; } }else{ if(document.getElementById('val_rater1')!=null && document.getElementById('val_rater1').value>=6){alert("Devi inserire: Facilità di navigazione");return false;} if(document.getElementById('val_rater2')!=null && document.getElementById('val_rater2').value>=6){alert("Devi inserire: Informazioni rispondenti alla realtà");return false;} if(document.getElementById('val_rater3')!=null && document.getElementById('val_rater3').value>=6){alert("Devi inserire: Cortesia del personale");return false;} if(document.getElementById('val_rater4')!=null && document.getElementById('val_rater4').value>=6){alert("Devi inserire: Pulizia");return false;} if(document.getElementById('val_rater5')!=null && document.getElementById('val_rater5').value>=6){alert("Devi inserire: Comfort delle camere");return false;} if(document.getElementById('val_rater6')!=null && document.getElementById('val_rater6').value>=6){alert("Devi inserire: Servizi");return false;} if(document.getElementById('val_rater7')!=null && document.getElementById('val_rater7').value>=6){alert("Devi inserire: Rapporto Qualità/Prezzo");return false;} } } var descr = document.getElementById("text_review"); if(descr.value == ""){ alert("Devi inserire: Testo"); return false; } return true; } function checkFieldDown(){ var name = document.getElementById("name"); if(name.value == ""){ alert("Devi inserire: Nome"); name.focus(); return false; } if(name.length > 255){ alert("Troppi caratteri nel campo: Nome"); name.focus(); return false; } var surname = document.getElementById("surname"); if(surname.value == ""){ alert("Devi inserire: Cognome"); surname.focus(); return false; } if(surname.length > 255){ alert("Troppi caratteri nel campo: Cognome"); surname.focus(); return false; } var country = document.getElementById("country"); if(country.value == "-1"){ alert("Devi inserire: Paese"); country.focus(); return false; } Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/; var email = document.getElementById("email"); if((Filtro.test(email.value)) == false){ alert("Devi inserire: Email"); email.focus(); return false; } if(email.length > 255){ alert("Troppi caratteri nel campo: Email"); email.focus(); return false; } return true; } function checkFieldContatto(){ if(document.getElementById("nome_prop")!=null) if(document.getElementById("nome_prop").value==''){ alert("Devi inserire: Nome"); document.getElementById("nome_prop").focus(); return false; } if(document.getElementById("cognome_prop")!=null) if(document.getElementById("cognome_prop").value==''){ alert("Devi inserire: Cognome"); document.getElementById("cognome_prop").focus(); return false; } if(document.getElementById("ruolo_attivita")!=null) if(document.getElementById("ruolo_attivita").value==''){ alert("Devi inserire: Ruolo all'interno dell'attività"); document.getElementById("ruolo_attivita").focus(); return false; } if( (document.getElementById("gender_f")!=null) && (document.getElementById("gender_m")!=null) ) if(!document.getElementById("gender_f").checked && !document.getElementById("gender_m").checked){ alert("Devi inserire: Sesso"); return false; } Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/; var email = document.getElementById("email_prop"); if (email!=null) { if((Filtro.test(email.value)) == false){ alert("Devi inserire: Email"); email.focus(); return false; } if(email.length > 255){ alert("Troppi caratteri nel campo: Email"); email.focus(); return false; } } return true; } function checkFieldCond(){ if(!document.getElementById("term").checked){ alert("Devi accettare: Condizioni d'uso"); return false; } if(!document.getElementById("privacy").checked){ alert("Devi accettare: Condizioni sulla privacy"); return false; } var existTitles=false; for (i=1;i<4;i++) if ( (document.getElementById('image'+i)!=null) && (document.getElementById('image'+i).value!='') ) existTitles=true; if (existTitles) { for (i=1;i<4;i++) if ( (document.getElementById('foto_home_default_'+i)!=null) && (document.getElementById('foto_home_default_'+i).value!='') ) if (document.getElementById('foto_home_default_'+i).checked) foto_default=document.getElementById('foto_home_default_'+i).value; if ( (document.getElementById('image'+foto_default)!=null) && (document.getElementById('image'+foto_default).value=='') ) { alert("Devi selezionare correttamente la foto di Default"); return false; } } $('.send_container').find('input[type=submit]').css('display','none'); $('.send_container').append('
'); return true; } function in_array(thaArray, element){ var res=false; for(var e=0;e=2)?parseInt(sels[( sels.length-1 )].id.substr("tr_tipcamere_".length))+1:"2"); var tipologie_camere=new Array(); for (j=1;j 255){ alert("Troppi caratteri nel campo: Email"); object.focus(); return false; } if (document.getElementById('formstep0')!=null) { var http=CreateXmlHttpReq(function(){}); var rnd = new Date(); http.open("GET", "/inc/chk_userbyemail_struct.php?email="+object.value+'&dummy='+(Math.random()*Math.round(rnd.getTime()/1000)), false); http.send(null); //if (http.readyState == 4 && http.status == 200) { var response=http.responseText; //} if(response!=0){ if(eregi("http:\/\/",response)){ if(confirm('L\'indirizzo email che hai inserito corrisponde ad una struttura già pubblicata su Nozio. Vuoi visualizzare la scheda della struttura?')){ document.location=response; return false; }else {object.focus();return false;} }else{ alert('L\'indirizzo email esiste già.'); object.focus(); return false; } } } break; case "address": if(object.value == ""){ alert("Devi inserire: Indirizzo"); object.focus(); return false; } break; case "cap": if(object.value == ""){ alert("Devi inserire: CAP"); object.focus(); return false; } break; case "citta": if(object.value == ""){ alert("Devi inserire: Città"); object.focus(); return false; } break; case "province": if(object.value == ""){ alert("Devi inserire: Provincia"); object.focus(); return false; } break; case "tel": if(object.value == ""){ alert("Devi inserire: Telefono"); object.focus(); return false; } break; case "term_strutt": if(!object.checked){ alert("Devi accettare: Condizioni d'uso"); object.focus(); return false; } break; case "privacy_strutt": if(!object.checked){ alert("Devi accettare: Condizioni sulla privacy"); object.focus(); return false; } break; } } return true; } function checkSearch(){ var keyword = document.getElementById("keyword"); if(keyword.value == ""){ keyword.value = " Cerca per nome hotel:"; } } function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor,hugger,hugMargin) { if (bgcolor=="") { bgcolor="#FFFFFF"; } var adj=10 var w = screen.width; var h = screen.height; var byFactor=1; if(w<740){ var lift=0.90; } if(w>=740 & w<835){ var lift=0.91; } if(w>=835){ var lift=0.93; } if (imageWidth>w){ byFactor = w / imageWidth; imageWidth = w; imageHeight = imageHeight * byFactor; } if (imageHeight>h-adj){ byFactor = h / imageHeight; imageWidth = (imageWidth * byFactor); imageHeight = h; } var scrWidth = w-adj; var scrHeight = (h*lift)-adj; if (imageHeight>scrHeight){ imageHeight=imageHeight*lift; imageWidth=imageWidth*lift; } var posLeft=0; var posTop=0; if (hugger == "hug image"){ if (hugMargin == ""){ hugMargin = 0; } var scrHeightTemp = imageHeight - 0 + 2*hugMargin; if (scrHeightTemp < scrHeight) { scrHeight = scrHeightTemp; } var scrWidthTemp = imageWidth - 0 + 2*hugMargin; if (scrWidthTemp < scrWidth) { scrWidth = scrWidthTemp; } if (scrHeight<100){scrHeight=100;} if (scrWidth<100){scrWidth=100;} posTop = ((h-(scrHeight/lift)-adj)/2); posLeft = ((w-(scrWidth)-adj)/2); } if (imageHeight > (h*lift)-adj || imageWidth > w-adj){ imageHeight=imageHeight-adj; imageWidth=imageWidth-adj; } posTop = parseInt(posTop); posLeft = parseInt(posLeft); scrWidth = parseInt(scrWidth); scrHeight = parseInt(scrHeight); var agt=navigator.userAgent.toLowerCase(); if (agt.indexOf("opera") != -1){ var args= new Array(); args[0]='parent'; args[1]=imageName; var i ; document.MM_returnValue = false; for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'"); } else { newWindow = window.open("vwd_justso.htm","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop); newWindow.document.open(); newWindow.document.write(''+alt+''); newWindow.document.write('
'); newWindow.document.write('Click screen to close'); newWindow.document.write('
'); newWindow.document.close(); newWindow.focus(); } } function checkFieldMessages(){ //tinyMCE.triggerSave(); var user = document.getElementById("sendto_id"); if(user.value == ""){ alert("Devi inserire: Utente"); return false; } var title = document.getElementById("titolo"); if(title.value == ""){ alert("Devi inserire: Titolo"); title.focus(); return false; } var testo = document.getElementById("testo"); if(testo.value == ""){ alert("Devi inserire: "); testo.focus(); return false; } return true; } function globalrater(){ var raterslbls=Array('','OTTIMO','BUONO','SUFFICIENTE','INSUFFICIENTE','PESSIMO'); if( document.getElementById('val_rater1')!=null && document.getElementById('val_rater2')!=null && document.getElementById('val_rater3')!=null && document.getElementById('val_rater4')!=null && document.getElementById('val_rater5')!=null && document.getElementById('val_rater6')!=null && document.getElementById('val_rater7')!=null ){ var numraters=0;var valraters=0; for(i=1;i<=7;i++){ if(document.getElementById('val_rater'+i).value<6){ valraters+=parseInt(document.getElementById('val_rater'+i).value); numraters++; } if(numraters>0){ var globalrate=Math.round(valraters/numraters); if(globalrate==0) globalrate=1; if(globalrate==6) globalrate=5; document.getElementById('lbl_globalrater').innerHTML='Il tuo giudizio complessivo è: '+raterslbls[globalrate]+''; document.getElementById('val_globalrater').value=raterslbls[globalrate]; } } } } function checkform(){ var msg=""; // controllo del nome & cognome var name = document.getElementById("name"); var msg=""; if(name.value == ""){ msg += "Devi inserire: Nome \n "; } if(name.lenght > 25){ msg +="Troppi caratteri nel campo: Nome \n "; } var surname = document.getElementById("surname"); if(surname.value == ""){ msg += "Devi inserire: Cognome \n "; } if(surname.lenght > 25){ msg +="Troppi caratteri nel campo: Cognome \n "; } //controllo mail Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/; var email = document.getElementById("email"); if((Filtro.test(email.value)) == false){ msg += "Devi inserire: Email \n "; } if(email.lenght > 255){ msg +="Troppi caratteri nel campo: Email \n "; } var username = document.getElementById("username"); if(username.value == ""){ alert("Devi inserire: Username"); return false; var password = document.getElementById("password"); if(password.value == ""){ alert("Devi inserire: Password"); return false; } var repassword = document.getElementById("repassword"); if(repassword.value == ""){ alert("Devi inserire: Password"); return false; } if(password!=repassword){ alert("Campo password != dalla conferma della password"); return false; } } var age = document.getElementById("age"); if(age.options[age.selectedIndex].value==""){ alert("Devi inserire: Età"); return false; } var country = document.getElementById("country"); if(country.value==""){ alert("Devi inserire: Paese"); return false; } if(!document.getElementById("check_term").checked){ alert("Devi accettare: Condizioni d'uso"); return false; } if(!document.getElementById("check_privacy").checked){ alert("Devi accettare: Condizioni sulla privacy"); return false; } if(msg != ""){ alert(msg); }else{ $.post('/inc/addusernews.php',{ nome_nwlt:$('#nome_nwlt').val(), email_nwlt:$('#email_nwlt').val() },function(data){alert(data);}); } } //********************************************************* function addRoomTypeRow(strqnt,strrm){ if(strqnt=='') strqnt='Qnt.'; if(strrm=='') strrm='X'; var campoin=document.getElementById('table_tipcamere'); var sels=campoin.getElementsByTagName('tr'); var newnum=((sels.length>=2)?parseInt(sels[( sels.length-1 )].id.substr("tr_tipcamere_".length))+1:"2"); var response; var idcat=0; if(document.getElementById('id_cat2')!=null && document.getElementById('id_cat2').value!="") idcat=document.getElementById('id_cat2').value; var myRequest = null; myRequest = CreateXmlHttpReq(function(){}); var sel=document.getElementById('valuta_1'); if(sel!=null){ myRequest.open("GET","/inc/getselect_camere.php?newnum="+newnum+"&id_cat="+idcat,false); myRequest.send(null); var response=myRequest.responseText; var valuta_label=sel.options[sel.selectedIndex].innerHTML; var valuta=document.getElementById('valuta_1').value; $('#table_tipcamere').append(' \ '+response+' \ n. \ \
Prezzo medio a notte
\ \ \ \ '+valuta_label+' \ '+strrm+' \ '); }else{ myRequest.open("GET","/inc/getselect_camere.php?newnum=1&id_cat="+idcat,false); myRequest.send(null); var response=myRequest.responseText; $('#table_tipcamere').append(' \ '+response+' \ n. \ \
Prezzo medio a notte
\
Prezzo medio a settimana
\ \ \ \   \ '); } if($.browser.msie) $("select").css({height: "auto"}); } function change_info(numero){ var var1="info_prezzo1_"+numero; var var2="info_prezzo2_"+numero; var tip="tipologiacamere_tip_"+numero; tip=document.getElementById(tip).value; if((tip=="a")||(tip=="b")||(tip=="c")||(tip=="g")){ document.getElementById(var1).style.display="block"; document.getElementById(var2).style.display="none"; }else{ document.getElementById(var2).style.display="block"; document.getElementById(var1).style.display="none"; } } function countLink(idsk,kindofclick,from){ var rnd = new Date(); var http=CreateXmlHttpReq(function(){ if (http.readyState == 4 && http.status == 200) { var response=http.responseText; } }); http.open("GET", "/inc/countLink.php?id_sk="+idsk+"&type="+kindofclick+"&from="+from+"&dummy="+(Math.random()*Math.round(rnd.getTime()/1000)), true); http.send(null); } function counttel(idsk){ var http=CreateXmlHttpReq(function(){ if (http.readyState == 4 && http.status == 200) { var response=http.responseText; } }); http.open("GET", "/inc/counttel.php?id_sk="+idsk, true); http.send(null); } function goto_and_back(idsk){ var myRequest = null; myRequest = CreateXmlHttpReq(function(){}); myRequest.open("GET","/inc/find_info_torna.php?id_sk="+idsk,false); myRequest.send(null); var response=myRequest.responseText; var response_arr=response.split(";"); var tip_cat2=response_arr[5]; var text_categoria=''; if (tip_cat2=='2') { text_categoria='Hotel e Alloggi'; } else if (tip_cat2=='6') { text_categoria='Volo e Auto'; } $("body").append(' \
\
\ \ '); var mtop; var h=0; var w=0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE w = window.innerWidth; h = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' w = document.documentElement.clientWidth; h = document.documentElement.clientHeight; } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { //IE 4 compatible w = document.body.clientWidth; h = document.body.clientHeight; } mtop=h/2-(200/2); mleft=w/2-(400/2); $("#bentornato").css({"position":"fixed","top": mtop, "left": mleft}); $("#sfondo2").css({"position":"fixed","top": mtop+3, "left": mleft+3}); $('#sfondo').click(function () { $(this).remove(); $("#sfondo2").remove(); $("#bentornato").remove(); }); $('.marchio').click(function () { $("#sfondo").remove(); $("#sfondo2").remove(); $("#bentornato").remove(); }); $('#src_chiudi').click(function () { $("#sfondo").remove(); $("#sfondo2").remove(); $("#bentornato").remove(); }); } function view_faq(id) { $('#abstract_'+id).toggle(); $('#testo_'+id).toggle(); } function checkFieldPubbl() { var a = document.getElementById('pubb_primo_piano'); var b = document.getElementById('ins_primo_piano'); var c = document.getElementById('ins_immagine_maxi'); var d = document.getElementById('ins_immagine'); var e = document.getElementById('ins_testo'); var f = document.getElementById('pubb'); //tinyMCE.triggerSave(); if (!a.checked && !b.checked && !c.checked && !d.checked && !e.checked && !f.checked) { alert('Devi selezionare almeno un tipo di pubblicità!'); return false; } return true; } function apriquattro(num_sites) { var limit=4; if (num_sites==null) num_sites=limit; myRequest4 = CreateXmlHttpReq(function(){}); myRequest4.open("GET","/inc/getUrlSites.php?num_sites="+num_sites,false); myRequest4.send(null); var response=myRequest4.responseText; var response_arr=response.split('***'); for(i=0;i