// funzioni localizzate con relative link in subdir New ...............

//var globMyHome = '/it/';
//var globMyHome = '/www.nosytour2.it/';
var globMyHome = '/';

function GO_NEW_HOME(){
        window.location.href  = globMyHome + 'index.htm'
}

// Funzioni adattate pro new release php

//---------------------------------------------------------------------------------
// FINESTRA DI SEARCH DESTINAZIONI VIA COMBOBOX
//---------------------------------------------------------------------------------
function src(){

var altmax = 285;
var larmax = 600;
var valwidth = 1;
var valheight = 1;
var URL_res = globMyHome + 'var/src.php';
var resizeh;

retleft = (screen.width - valwidth)/4.3;
rettop = (screen.height - valheight)/3.2;

popupsrc=window.open(URL_res ,"",'height='+valheight+',width='+valwidth+', menubar=0,location=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,left='+retleft+' ,top='+rettop+'')
        
                while (valheight < altmax && valwidth < larmax ) {

                diffh = altmax - valheight;     
                diffl = larmax - valwidth;
                resizeh = Math.round (diffh/150);               
                resizel = Math.round (diffl/150);                               
                valheight = Math.round  (valheight)+Math.round (resizeh);
                valwidth = Math.round  (valwidth)+Math.round (resizel);
                
                popupsrc.resizeTo (valwidth ,valheight);
                
                        if (resizeh < 1 && resizel < 1){break;}
                
                }       

}

function split_src (value){
S=value;
newS=S.split("|");
window.opener.document.location= globMyHome + 'cat/alberghi_lettura.php?ID_nazioni='+newS[1].toString()+'&ID_localita='+newS[0].toString()+''
window.setInterval ("close()" ,1500 );
}

function naz_src (value){
S=value;
// window.opener.document.location='http://www.nosytour.it/catalogo/nazioni_lettura.asp?ID_nazioni='+S+''
window.opener.document.location= globMyHome + '/cat/nazioni_lettura.php?ID_nazioni='+S+''
window.setInterval ("close()" ,1500 );
}

//---------------------------------------------------------------------------------
function popup_megliofferte(){
window.open(globMyHome + "pop/popup_megliofferte.php","","height=360,width=550,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,left=350,top=350")
}

function prevmail(){
window.location.href = 'mailto:preventivi@nosytour.it?subject=Richiesta Preventivo&body=(Vi ricordiamo di indicare: Destinazione, Numero Partecipanti, Aeroporto di partenza ed ogni altra informazione riteniate utile) Grazie! - Lo Staff Nosytour.';
}

//---------------------------------------------------------------------------------

// HomePage Popup Windows
// ----------------------
function popup_last (flgShowMe){
        if (flgShowMe){
                window.open("./pop/popup_last.php","","height=420,width=530,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=0,toolbar=0,left=200,top=200")
                }
}
function popup_HD (){
        window.open("./pop/popup_spHappyDays.php","","height=640,width=540,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,left=350,top=350")
}
function popup_Manado (){
	window.open("./pop/popup_spManado.php","","height=640,width=530,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,left=400,top=400")
}
function popup_Roulette (){
        window.open("./pop/popup_Roulette.php","","height=700,width=540,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,left=350,top=350")
}
function popup_BaliLombok (){
	window.open("./pop/popup_spBaliLombok_2.php","","height=400,width=530,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,left=400,top=400")
}

//-----

function speciali(){
        window.open(globMyHome + "pop/popup_speciali.php","","height=560,width=550,menubar=0,resizable=1,scrollbars=1,status=1,titlebar=0,toolbar=0,left=200,top=200")
}

function ultime(){
        window.open(globMyHome + "pop/popup_ultime.php","","height=500,width=550,menubar=0,resizable=1,scrollbars=1,status=1,titlebar=0,toolbar=0,left=200,top=200")
}

function adeguamenti(){
window.open("var/adeguamenti.php","","height=200,width=400,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,left=200,top=200")
}

function popup_validita(){
window.open("var/validita.php","","height=280,width=550,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,left=350,top=350")
}

function popup_aboutus (){
window.open(globMyHome + "pop/popup_aboutus.php","","height=560,width=500,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,left=350,top=350")
}

function preventivo(){
//window.location.href  = 'mailto:preventivi@nosytour.it?subject=Richiesta%20Preventivo&body=(Vi%20ricordiamo%20di%20indicare:%20Destinazione,%20Numero%20Partecipanti,%20Aeroporto%20di%20partenza%20ed%20ogni%20altra%20informazione%20riteniate%20utile)%0AGrazie!%20-%20Lo%20Staff%20Nosytour.%0A%0A'

// OK sin a 070713
// window.location.href  = 'mailto:preventivi@nosytour.it?subject=Richiesta%20Preventivo&body=(Vi%20ricordiamo%20gentilmente%20di%20indicare:%20Destinazione,%20Numero%20Partecipanti,%20Durata del viaggio,%20Aeroporto%20di%20partenza%20preferito,%20Nome%20e%20Cognome,%20Numero%20di%20telefono%20ed%20ogni%20altra%20informazione%20riteniate%20utile)%0ASarą%20nostra%20cura%20rispondervi%20nel%20pił%20breve%20tempo%20possibile.%0AGrazie!%20-%20Lo%20Staff%20Nosytour.%0A%0A'
//window.location.href  = globMyHome + "varie/prev.asp"
window.location.href  = globMyHome + "var/prev.php";
}

function preventivoNEW(arg_subj,arg_dest){
	newhref = globMyHome + "var/prev.php";
	if (arg_subj != null) {
		newhref = newhref + '?PRV_subject=' + arg_subj;
	}
	if (arg_dest != null) {
		if (arg_subj != null) {newhref = newhref + '&PRV_destination=' + arg_dest; 
		} else { newhref = newhref + '?PRV_destination=' + arg_dest; } 
	}
	window.location.href  = newhref;
}


function mailing(){
//window.open("http://www.nosytour.it/MLnosy.php","","height=400,width=630,menubar=0,resizable=0,scrollbars=yes,status=0,titlebar=0,toolbar=0,left=10,top=10")
window.open(globMyHome + "var/MLnosy.php","","height=500,width=800,menubar=0,resizable=1,scrollbars=yes,status=1,titlebar=0,toolbar=0,left=10,top=10")
}




//-------------------------------

function popup_singapore (){
        window.open("./varie/popup_singapore.asp","","height=650,width=540,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,left=350,top=350")
}
function popup_malesia (){
        window.open("./varie/popup_malesia.asp","","height=700,width=540,menubar=0,resizable=1,scrollbars=0,status=0,titlebar=0,toolbar=0,left=350,top=350")
}
function popup_cocos (){
        window.open("./varie/popup_OFR_cocos.asp","","height=650,width=540,menubar=0,resizable=1,scrollbars=0,status=0,titlebar=0,toolbar=0,left=350,top=350")
}

function popup_spCruise (){
        window.open("./varie/popup_spCruise.asp","","height=800,width=540,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,left=350,top=350")
}
function popup_garantite (){
        window.open("./varie/popup_garantite.asp","","height=555,width=540,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,left=350,top=350")
}
function popup_malapascua (){
        window.open("./varie/popup_spMalapascua.asp","","height=455,width=540,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,left=350,top=350")
}










//---------------------------------------------------------------------------------
function pathtomyhome() {
var path = document.location.pathname;
var ix_slash = path.lastIndexOf ('/');
var ix_dot = path.lastIndexOf ('.');
var pathid = path.substring (ix_slash + 1, ix_dot); // get the element id
}
//---------------------------------------------------------------------------------





//
function cat_GO(arg_naz,arg_loc) {
        if (arg_loc == null)
                        { window.location.href  = globMyHome + 'catalogo/nazioni_lettura.asp?ID_nazioni=' + arg_naz; }
        else    { window.location.href  = globMyHome + 'catalogo/alberghi_lettura.asp?ID_localita=' + arg_loc + '&ID_nazioni=' + arg_naz; }
}
//      window.frames['mainFrame'].location.href  = './catalogo/nazioni_lettura.asp?ID_nazioni=1';
//window.location.href  = './catalogo/nazioni_lettura.asp?ID_nazioni=1';
//      document.frames['mainFrame'].location = './catalogo/nazioni_lettura.asp?ID_nazioni=' + arg_naz;
//      else ;
function cat_GO_FIX(arg_naz,arg_loc) {
window.location.href  = './catalogo/nazioni_lettura.asp?ID_nazioni=1';
}

function MF_redir(page) {
  if (parent.frames['mainFrame']==null)
  {
    top.location.href = "index.a?load="+page;
  }
}

// /catalogo/nazioni_lettura.asp?ID_nazioni=1
// /catalogo/alberghi_lettura.asp?ID_localita=1&ID_nazioni=1




//---------------------------------------------------------------------------------

function garantite(){
window.open("http://www.nosytour.it/pargar0807.htm","","height=600,width=800,menubar=0,resizable=1,scrollbars=1,status=1,titlebar=0,toolbar=0,left=100,top=100")
}






function english(){
window.open("http://www.nosytour.it/utility/english.htm","","height=400,width=630,menubar=0,resizable=0,scrollbars=0,status=0,titlebar=0,toolbar=0,left=10,top=10")
}

function esperto(){
window.open("http://www.nosytour.it/esperto.htm","","height=450,width=630,menubar=0,resizable=0,scrollbars=yes,status=0,titlebar=0,toolbar=0,left=10,top=10")
}

function fotoback(ide){

var URL_res ='http://www.nosytour.it/utility/fotopopup.asp?fotosrc='+ide+'';

newwindow=window.open(URL_res ,"pippo","height=450,width=740,menubar=0,location=0,resizable=0,scrollbars=yes,status=0,titlebar=0,toolbar=0,left=10,top=10")
newwindow.creator="pippo"
}
function foto(ide){

var URL_res ='http://www.nosytour.it/utility/fotopopup.asp?fotosrc='+ide+'';

newwindow=window.open(URL_res ,"pippo","menubar=0,location=0,resizable=0,scrollbars=yes,status=0,titlebar=0,toolbar=0,left=10,top=10")
newwindow.creator="pippo"
}





function popup_crociera (){
window.open("http://www.nosytour.it/varie/popup_crociera.asp","","height=318,width=475,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=0,toolbar=0,left=350,top=350")
}

