﻿function Juice_SelectVeld(veld) {
    veld.style.backgroundColor='#FFFFFF';
}

function Juice_SelectRadio(veld) {
    veld.style.backgroundColor='#BBBBAE';
}

function submitform(action)
{ 
    document.getElementById('FormAction').value = action;
    var theForm = document.forms['aspnetForm'];
    if (!theForm) {
        theForm = document.aspnetForm;
    }
    theForm.submit();      
//  document.aspnetForm.submit();
}

function ZoekReis(dropdown)
{
    document.getElementById('FormAction').value = 'changeDrop';
    document.getElementById('LastSelection').value = dropdown;
    document.getElementById('selectType').disabled=true;
    document.getElementById('selectLand').disabled=true;
    if (document.getElementById('selectCity'))
    {
        document.getElementById('selectCity').disabled=true;
    }
    __doPostBack('ctl00$LinkButtonTriggerDropDown','');
}


function goSearch(by)
{
    
    if (document.getElementById(by))
    {
        var value = document.getElementById(by).value;
        
        if (value !='')
        {
            document.body.style.cursor='wait';
            document.getElementById(by).style.cursor='wait';
            document.location= '/Zoeken/' + by + '/' + value + '.aspx';
        }
        
    }
}


var popUpWin=0;
function popUpWindow(URLStr, left, top, width, height,menubar)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,scrollbar=no,resizable=no,copyhistory=yes,' + menubar +', width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function PopIt(reisid)
{
    popUpWindow('/PrintPop.aspx?reisid='+reisid,100,100,650, 600,'menubar=yes');   
}


function ToggleFaq(value)
{
    if (document.getElementById('_Antwoord_' + value + '_'))
    {
        if (document.getElementById('_Antwoord_' + value + '_').style.display == 'none')
        {
        document.getElementById('_Antwoord_' + value + '_').style.display = 'block';
        }
        else
        {
        document.getElementById('_Antwoord_' + value + '_').style.display = 'none';
        }
    }
}

function checkForm(value)
{
    switch (value)
    {	
        case "Reisinformatiedagen":
            MM_validateForm(   'Naam','','R',  
                               'Aantalpersonen','','R',
                               'Telefoon','','R',
                               'Lunch','','RisRadio',
                               'E-mail','','RisEmail');
            break;
        case "Lid-Worden":
            MM_validateForm(   'Voorletters','','R',  
                               'Achternaam','','R',
                               'Adres','','R',
                               'Postcode','','R',
                               'Plaats','','R',
                               'E-mail','','RisEmail');
            break;
        case "Stuur-Email":
            MM_validateForm(   'Voorletters','','R',  
                               'Achternaam','','R',
                               'Vraag','','R',
                               'Adres','','R',
                               'Postcode','','R',
                               'Plaats','','R',
                               'Telefoon','','R',
                               'E-mail','','RisEmail');
            break;
        case "Offerte-aanvragen":
            MM_validateForm(   'Naam','','R',  
                               'Adres','','R',
                               'Postcode','','R',
                               'Plaats','','R',
                               'Postcode','','R',
                               'Telefoon','','R',
                               'E-mail','','RisEmail',
                               'Aantalpersonen','','R',
                               'Vertrek','','R',
                               'Terugreis','','R');
            break;
        case "Offerte-aanvragen-reizen":
                MM_validateForm(   'Totaal aantal reizenden','','R',  
                                   'Voorletters contactpersoon','','R',
                                   'Achternaam contactpersoon','','R',
                                   'Straatnaam contactpersoon','','R',
                                   'Huisnummer contactpersoon','','R',
                                   'Postcode contactpersoon','','R',
                                   'Woonplaats contactpersoon','','R',
                                   'Telefoonnummer contactpersoon','','R',
                                   'E-mailadres contactpersoon','','RisEmail',
                                   'Waarvan kent u Wereldcontact','','RisDropDown');
            break;
        case "Mail-a-friend":
            MM_validateForm(   'Naam','','R',  
                               'E-mailNaar','','RisEmail',
                               'NaamVan','','R',
                               'E-mailVan','','RisEmail');
            break;
        case "Terugbel":
            MM_validateForm(   'Naam','','R',  
                               'Telefoonnummer','','R');
            break;
        case "enquete":
            document.MM_returnValue = true;
            break;
        case "Adreswijziging":
            MM_validateForm(   'Voorletters','','R',  
                               'Achternaam','','R',
                               'adres','','R',
                               'postcode','','R',
                               'plaats','','R',
                               'ingang datum','','R');
            break;
         case "reismarkt":
            MM_validateForm(   'VoorlettersAchternaam','','R',  
                               'Lidmaatschapnr','','R',
                               'bestemming','','R',
                               'stroomvoorziening','','R');
            break;
        default:
            document.MM_returnValue = false 
    }

    if (document.MM_returnValue)
        submitform();
}

function MM_openBrWindow(theURL,winName,width,height) { //v2.0
height = height ;
var winl = (screen.width - width) / 2;
var wint = (screen.height - height) / 2;
var i = width ;
var j = height ;
var features = 'scrollbars=no,resizable=no,width='+width+',height='+height+',top='+wint+',left='+winl+'';
var popupscherm;
popupscherm=window.open(theURL,winName,features);
popupscherm.resizeTo(i,j);
popupscherm.focus();
}

var rotatorSet = false;

function InitRotator(xml)
{
if (document.getElementById('FlashContainer'))
{
    var s1 = new SWFObject("/imagerotator.swf","rotator","980","120","7");
		    s1.addParam("menu","false");
		    s1.addParam("wmode","transparent");
		    s1.addParam("quality","high");
		    s1.addVariable("height","120");
		    s1.addVariable("width","980");
		    s1.addVariable("file","/Headers/" + xml);
		    s1.addVariable("shownavigation","false");
		    s1.addVariable("transition","fade");
		    s1.addVariable("backcolor","0x000000");
		    s1.addVariable("frontcolor","0xFFFFFF");
		    s1.addVariable("lightcolor","0xCC0000");
		    s1.addVariable("screencolor","0x000000");
		    s1.addVariable("kenburns","false");
		    s1.addVariable("overstretch","false");
		    s1.addVariable("showicons","false");
		    s1.addVariable("repeat","true");
		    s1.addVariable("rotatetime","8");
		    s1.addVariable("shuffle","true");
		    s1.addVariable("linkfromdisplay","true");
		    s1.addVariable("linktarget","_self");
		    s1.write("FlashContainer");
		    rotatorSet = true
}
}

function checkRotator()
{
    if (rotatorSet != true)
    {
        InitRotator('Rotator1208.xml');
    }
}