﻿var rotator1 = {
    path:   '../../images/rotating_banner/',
    id:   'mvh_header_image',
    speed:  4000, // default 4500
    images: ["image7.jpg", "image3.jpg", "image4.jpg" , "image5.jpg","image10.jpg", "image8.jpg"],
    bTrans: true // ie win filter
}

function initRotator() {
    dw_Rotator.setup(rotator1);
}
dw_Event.add( window, 'load', initRotator);

function loadExternalContent(elementSelector, sourceUrl) {
	$(""+elementSelector+"").load(sourceUrl);
}

function loadContent(elementSelector, sourceUrl) {
	$(""+elementSelector+"").load("http://www.myvacationhome.nl/mvh_website_gen03/"+sourceUrl+"");

}

function loadSSLContent(elementSelector, sourceUrl) {
	$(""+elementSelector+"").load("https://www.myvacationhome.nl/mvh_website_gen03/"+sourceUrl+"");

}


function hideStickyNote() { 
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById('mvh_sticky_note').style.visibility = 'hidden'; 
		} 
	else { 
	if (document.layers) { // Netscape 4 
		document.mvh_sticky_note.visibility = 'hidden'; 
		} 
	else { // IE 4 
		document.all.mvh_sticky_note.style.visibility = 'hidden'; 
		} 
	} 
}
function showStickyNote() { 
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById('mvh_sticky_note').style.visibility = 'visible'; 
		} 
	else { 
	if (document.layers) { // Netscape 4 
		document.mvh_sticky_note.visibility = 'visible'; 
		} 
	else { // IE 4 
		document.all.mvh_sticky_note.style.visibility = 'visible'; 
		} 
	} 
}


function hideLoadDiv() { 
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById('loadContainerIcon').style.visibility = 'hidden'; 
		} 
	else { 
	if (document.layers) { // Netscape 4 
		document.loadContainerIcon.visibility = 'hidden'; 
		} 
	else { // IE 4 
		document.all.loadContainerIcon.style.visibility = 'hidden'; 
		} 
	} 
}
function showLoadDiv() { 
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById('loadContainerIcon').style.visibility = 'visible'; 
		} 
	else { 
	if (document.layers) { // Netscape 4 
		document.loadContainerIcon.visibility = 'visible'; 
		} 
	else { // IE 4 
		document.all.loadContainerIcon.style.visibility = 'visible'; 
		} 
	} 
}

function hideSideMenu() { 
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById('load_side_menu').style.visibility = 'hidden'; 
		} 
	else { 
	if (document.layers) { // Netscape 4 
		document.load_side_menu.visibility = 'hidden'; 
		} 
	else { // IE 4 
		document.all.load_side_menu.style.visibility = 'hidden'; 
		} 
	} 
}

function showSideMenu() { 
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById('load_side_menu').style.visibility = 'visible'; 
		} 
	else { 
	if (document.layers) { // Netscape 4 
		document.load_side_menu.visibility = 'visible'; 
		} 
	else { // IE 4 
		document.all.load_side_menu.style.visibility = 'visible'; 
		} 
	} 
}

function hideDiv() { 
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById('hThemeID01').style.visibility = 'hidden'; 
		} 
	else { 
	if (document.layers) { // Netscape 4 
		document.hThemeID01.visibility = 'hidden'; 
		} 
	else { // IE 4 
		document.all.hThemeID01.style.visibility = 'hidden'; 
		} 
	} 
}
function showDiv() { 
	if (document.getElementById) { // DOM3 = IE5, NS6 
		document.getElementById('hThemeID01').style.visibility = 'visible'; 
		} 
	else { 
	if (document.layers) { // Netscape 4 
		document.hThemeID01.visibility = 'visible'; 
		} 
	else { // IE 4 
		document.all.hThemeID01.style.visibility = 'visible'; 
		} 
	} 
}

function loadPopupDivContent(hID) {
		
	loadContent('#hThemeID01','mvh_popup_div/generate_hThemeSetDiv.asp?houseID='+hID); 	

 	}

function setUpTooltips(tag,tagID,element){	
	$(tag+"#"+tagID).easyTooltip({
		useElement: element				   
	});
}

function setUpTipsContent(tag,tagID,sContent){	
	$(tag+"#"+tagID).easyTooltip({
		content: sContent
	});
}


function mainPageSetup() {
	loadContent('#mvhsmallsearchbox', 'MVH_main_page/mvh_search_panel/mvh_search_panel.asp');
	loadContent('#mvh_body_text', 'MVH_main_page/mvh_main_page_text/special_announcement.htm');
	loadContent('#footer', 'MVH_main_page/mvh_main_page_text/footer.htm');
	loadContent('#loadContainerIcon','MVH_main_page/mvh_load_image/loading.htm');
	loadContent('#load_side_menu','MVH_main_page/mvh_load_image/loading_v01.htm');

}

function mainFlyerSetup() {
	loadContent('#mvhsmallsearchbox', 'MVH_main_page/mvh_search_panel/mvh_search_panel.asp');
	loadContent('#footer', 'MVH_main_page/mvh_main_page_text/footer.htm');
	loadContent('#loadContainerIcon','MVH_main_page/mvh_load_image/loading.htm');
	loadContent('#load_side_menu','MVH_main_page/mvh_load_image/loading_v01.htm');

}

function loadHomePage() {
	showSideMenu();	
	showLoadDiv();
	loadContent('#mvh_main_container', 'MVH_main_page/mvh_home_page/mvh_home_page_v03.asp?menuType=1');
	showStickyNote();
	
}

function zoekEnBoek(level) {
	hideStickyNote();
	loadContent('#center_bar', 'MVH_main_page/mvh_load_image/loading_v01.htm');
	showLoadDiv();
	loadContent('#mvh_main_container','MVH_google_search/mvh_google_search_module_v02.asp?gLoadType=mvhStandard&viewLevel='+level+'&menuType=2');
}

function loadSpotLight(country,level,ID) {
	loadContent('#center_bar', 'MVH_main_page/mvh_load_image/loading_v01.htm');
	hideStickyNote();
	showLoadDiv();	
	loadContent('#mvh_main_container', 'MVH_Spot_Promotions/mvhSpotsPromotions_V01.asp?menuType=2&country='+country+'&rName='+level+'&destination='+ID);
}	

function loadGuestBook(country,regionID) {
	hideStickyNote();
	loadContent('#center_bar', 'MVH_main_page/mvh_load_image/loading_v01.htm');
	showLoadDiv();
	loadContent('#mvh_main_container', 'MVH_Guest_Book/mvhGuestBook_V02.asp?menuType=2&country='+country+'&regionID='+regionID);
}

function loadGoogleMaps(level,ID) {
	hideStickyNote();
	loadContent('#center_bar', 'MVH_main_page/mvh_load_image/loading_v01.htm');
	showLoadDiv();
	loadContent('#mvh_main_container','MVH_google_search/mvh_google_search_module_v02.asp?menuType=2&gLoadType=mvhStandard&viewLevel='+level+'&countryID='+ID+'&regionID='+ID);
}

function reLoadGoogleMaps(viewLevel,zoomLevel,cLatitude,cLongitude,TopLeftLatitude,TopLeftLongitude,BottomRightLatitude,BottomRightLongitude,destination,noPersons,hPrice,fromDate,toDate,duration,noRooms,sPool,sPets,hPhoto) {
	hideStickyNote();
	loadContent('#center_bar', 'MVH_main_page/mvh_load_image/loading_v01.htm');
	showLoadDiv();
	loadContent('#mvh_main_container','MVH_google_search/mvh_google_search_module_v02.asp?menuType=2&viewLevel=mvhCustom&gZoomLevel='+zoomLevel+'&centerLatitude='+cLatitude+'&centerLongitude='+cLongitude+'&TopLeftLatitude='+TopLeftLatitude+'&TopLeftLongitude='+TopLeftLongitude+'&BottomRightLatitude='+BottomRightLatitude+'&BottomRightLongitude='+BottomRightLongitude+'&destination='+destination+'&noPersons='+noPersons+'&hPrice='+hPrice+'&fromDate='+fromDate+'&toDate='+toDate+'&duration='+duration+'&numberOfRooms='+noRooms+'&sPool='+sPool+'&sPets='+sPets+'&hPhoto='+hPhoto);
}

function loadGoogleThemeMaps(level,ID,tID) {
	hideStickyNote();	
	loadContent('#center_bar', 'MVH_main_page/mvh_load_image/loading_v01.htm');
	showLoadDiv();	
	loadContent('#mvh_main_container','MVH_themes/google_theme_search/mvh_google_theme_search_v02.asp?menuType=2&gLoadType=mvhStandard&viewLevel='+level+'&countryID='+ID+'&regionID='+ID+'&themeID='+tID);
}

function reLoadGoogleThemeMaps(viewLevel,zoomLevel,cLatitude,cLongitude,TopLeftLatitude,TopLeftLongitude,BottomRightLatitude,BottomRightLongitude,destination,noPersons,hPrice,fromDate,toDate,duration,noRooms,sPool,sPets,hPhoto,themeID) {
	hideStickyNote();
	loadContent('#center_bar', 'MVH_main_page/mvh_load_image/loading_v01.htm');
	showLoadDiv();
	loadContent('#mvh_main_container','MVH_themes/google_theme_search/mvh_google_theme_search_v02.asp?menuType=2&viewLevel=mvhCustom&gZoomLevel='+zoomLevel+'&centerLatitude='+cLatitude+'&centerLongitude='+cLongitude+'&TopLeftLatitude='+TopLeftLatitude+'&TopLeftLongitude='+TopLeftLongitude+'&BottomRightLatitude='+BottomRightLatitude+'&BottomRightLongitude='+BottomRightLongitude+'&destination='+destination+'&noPersons='+noPersons+'&hPrice='+hPrice+'&fromDate='+fromDate+'&toDate='+toDate+'&duration='+duration+'&numberOfRooms='+noRooms+'&sPool='+sPool+'&sPets='+sPets+'&hPhoto='+hPhoto+'&themeID='+themeID);
}

function sendEmail(theButton,processStep,theHouseID,toEmail,fromEmail,ccEmail,telNumber,emailSubject,sRequests,pageCount) {
	hideStickyNote();
	loadContent('#center_bar', 'MVH_main_page/mvh_load_image/loading_v01.htm');
 	showLoadDiv(); 		
 	loadContent('#mvh_main_container','MVH_main_page/mvh_contact_form/submit_house_inquiry_form_V02.asp?menuType=1&processStep='+processStep+'&theButton='+theButton+'&theHouseID='+theHouseID+'&toEmail='+toEmail+'&fromEmail='+fromEmail+'&ccEmail='+ccEmail+'&telNumber='+telNumber+'&emailSubject='+emailSubject+'&sRequests='+sRequests+'&pageCount='+pageCount);
 }

function loadMainContent(contentType) {
	loadContent('#mvh_main_container', 'MVH_main_page/mvh_home_page/flushFile.htm');
	loadContent('#center_bar', 'MVH_main_page/mvh_load_image/loading_v01.htm');
	hideStickyNote();
	switch(contentType){
	case 'contactUs':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_contact_form/submit_house_inquiry_form_V02.asp?menuType=1&processStep=0&pageCount=1');
		break
	case 'contactInfo':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_contact_form/mvh_contact_information.asp?menuType=1');
		break
	case 'aboutUs01':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_about_us_page/who_are_we_page.asp?menuType=1');
		break
	case 'aboutUs02':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_about_us_page/what_we_do_page.asp?menuType=1');
		break
	case 'aboutUs03':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_about_us_page/our_phylisophy_page.asp?menuType=1');
		break
	case 'aboutUs04':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_about_us_page/organization_page.asp?menuType=1');
		break
	case 'generalConditions':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_terms_conditions/algemene_voorwaarden.asp?menuType=1');
		break
	case 'generalHouseConditions':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_terms_conditions/voorwaarden_myvacationhome.asp?menuType=1');
		break
	case 'mvhPrivacy':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_terms_conditions/mvv_privacy_statement.asp?menuType=1');
		break
	case 'mvhSGR':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_terms_conditions/mvh_sgr.asp?menuType=1');
		break
	case 'flightsConditions':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_terms_conditions/voorwaarden_ATP.asp?menuType=1');
		break
	case 'CarConditions':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_terms_conditions/voorwaarden_sunnycars.asp?menuType=1');
		break
	case 'viewMyBooking':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/MVH_view_booking/view_my_booking.asp?menuType=1&processStep=0');
		break
	case 'carRentals':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_services/car_rentals.asp?menuType=1');
		break
	case 'insuranceServices':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_insurance_Services/insurance_services_v01.asp?menuType=1');
		break
	case 'mvhMainThemes':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhMainThemePage/mvhMainThemePage.asp?menuType=2');
		break
	case 'cookingTheme':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhCookingThemePage/mvhCookingThemePage.asp?menuType=2');
		break
	case 'wineTastingTheme':
		showLoadDiv();	
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhWineThemePage/mvhWineThemePage.asp?menuType=2');
		break
	case 'agriturismo':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhAgriturismoThemePage/mvhAgriturismoThemePage.asp?menuType=2');
		break
	case 'wellnessTheme':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhWellnessThemePage/mvhWellnessThemePage.asp?menuType=2');
		break
	case 'wineTastingItaly':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhCountryThemePage/mvhCountryPage.asp?menuType=2&country=italy&themeID=1');		
		break
	case 'wineTastingPortugal':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhCountryThemePage/mvhCountryPage.asp?menuType=2&country=portugal&themeID=1');		
		break
	case 'wineTastingSpain':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhCountryThemePage/mvhCountryPage.asp?menuType=2&country=spain&themeID=1');		
		break
	case 'cookingItaly':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhCountryThemePage/mvhCountryPage.asp?menuType=2&country=italy&themeID=2');		
		break
	case 'cookingPortugal':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhCountryThemePage/mvhCountryPage.asp?menuType=2&country=portugal&themeID=2');		
		break
	case 'cookingSpain':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhCountryThemePage/mvhCountryPage.asp?menuType=2&country=spain&themeID=2');		
		break
	case 'spaItaly':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhCountryThemePage/mvhCountryPage.asp?menuType=2&country=italy&themeID=3');		
		break
	case 'spaPortugal':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhCountryThemePage/mvhCountryPage.asp?menuType=2&country=portugal&themeID=3');		
		break
	case 'spaSpain':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhCountryThemePage/mvhCountryPage.asp?menuType=2&country=spain&themeID=3');		
		break
	case 'agriturismoItaly':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhCountryThemePage/mvhCountryPage.asp?menuType=2&country=italy&themeID=4');		
		break
	case 'agriturismoPortugal':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhCountryThemePage/mvhCountryPage.asp?menuType=2&country=portugal&themeID=4');		
		break
	case 'agriturismoSpain':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_main_page/mvh_theme_pages/mvhCountryThemePage/mvhCountryPage.asp?menuType=2&country=spain&themeID=4');		
		break
	case 'submitInquiryForm':
		showLoadDiv();
		loadContent('#mvh_main_container','MVH_inquiry_form/submit_search_request_prototype_V01.asp?menuType=1');		
		break

	}
	

}


