﻿// JScript File

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-12108010-3']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

function structure(){

    document.write("<div style='background-color:#81b1e8;width:100%;padding:0px;background-color:#81b1e8;background-repeat:no-repeat'><img src='/images/header2.jpg' style='border:1px solid #0055a5;margin-left:20px;' alt='2010 European Water and Flood Modelling Conference' /></div>");

    document.write("<div id='menu' style='margin-top:5px;border-left:0px solid #ffffff;'>");
    document.write("<div style='width:140px;background-color:#81b1e8;padding:5px;border-left:20px solid #81b1e8;margin-bottom:2px'>");
        document.write("<img src='/images/transparent.gif' style='height:20px;' />");
    document.write("</div>");
    document.write("<div class='menuItem'><a href='/'>OVERVIEW</a></div>");
    document.write("<div class='menuItem'><a href='/registration/'>COSTS &amp; REGISTRATION</a></div>");
    document.write("<div class='menuItem'><a href='/papers/'>CALL FOR PAPERS</a></div>");
    document.write("<div class='menuItem'><a href='/agenda/'>AGENDA</a></div>");
    document.write("<div class='menuItem'><a href='/keynote/'>KEYNOTE SPEAKERS</a></div>");
    document.write("<div class='menuItem'><a href='/entertainment/'>ENTERTAINMENT</a></div>");
    document.write("<div class='menuItem'><a href='/sponsors/'>SPONSORS</a></div>");
    document.write("<div class='menuItem'><a href='/sponsorship/'>SPONSORSHIP</a></div>");
    document.write("<div class='menuItem'><a href='/accommodation/'>ACCOMMODATION</a></div>");
    document.write("<div class='menuItem'><a href='/location/'>LOCATION & TRANSPORT</a></div>");
    document.write("<div class='menuItem'><a href='/archive/2011/'>2011 PRESENTATIONS</a></div>");

    document.write("<div style='width:140px;background-color:#81b1e8;padding:5px;border-left:20px solid #81b1e8;margin-top:2px'>");
        document.write("<img src='/images/transparent.gif' style='height:20px;' />");
    document.write("</div>");

    document.write("<a href='/agenda/how_fast_could_your_model_run.pdf' target='_blank'><img src='/images/how_fast.gif' style='padding:1px;background-color:#739ecf;margin-top:2px;' /></a>");

    document.write("<div style='width:140px;background-color:#81b1e8;padding:5px;border-left:20px solid #81b1e8;margin-top:2px'>");
        document.write("<img src='/images/transparent.gif' style='height:20px;' />");
    document.write("</div>");
    
    document.write("<div style='font-color:#808080;font-size:10px;'>");
    document.write("conferences@innovyze.com<br />+44 (0) 1491 821460</div></div>");

    sponsors();
}

function footer(){

    document.write("<div id='footer' style='margin-top:50px;'>");
    
        document.write("<div class='smallLinksTitle'>Organised by:</div>");
        document.write("<div class='smallLinks'><a href='http://www.innovyze.com' target='_blank'>Innovyze</a></div>");
        
        document.write("<div class='smallLinksTitle'>Sponsored by:</div>");
        document.write("<div class='smallLinks'>")
        document.write("<a href='http://www.acel.co.uk/' target='_blank'>Applied Computing</a> | ");
        document.write("<a href='http://www.atkinsglobal.com/' target='_blank'>Atkins</a> | ");
        document.write("<a href='http://www.clearltd.com/' target='_blank'>Clear Environmental Consultants</a> | ");
        document.write("<a href='http://www.enginsoft.co.uk/' target='_blank'>EnginSoft UK</a> | ");
        document.write("<a href='http://http://www.environment-agency.gov.uk/' target='_blank'>Environment Agency</a> | ");
        //document.write("<a href='http://www.esriuk.com/' target='_blank'>ESRI (UK)</a> | ");
        document.write("<a href='http://www.hrwallingford.co.uk/' target='_blank'>HR Wallingford</a> | ");
        document.write("<a href='http://www.hydro-international.biz/' target='_blank'>Hydro International</a> | ");
        //document.write("<a href='http://www.mouchel.com/' target='_blank'>Mouchel</a> | ");
        document.write("<a href='http://www.onsite.com/' target='_blank'>Onsite</a> | ");
        document.write("<a href='http://www.raaltd.co.uk/' target='_blank'>Richard Allitt Associates</a> | ");
        document.write("<a href='http://http://www.stormscape.co.uk//' target='_blank'>StormScape</a> | ");
        //document.write("<a href='http://www.thameswater.co.uk' target='_blank'>Thames Water</a></div>");
        
    
    document.write("</div>");

}

function randOrd(){
    return (Math.round(Math.random())-0.5); 
} 

function sponsors(){

atkinsArray = new Array("atkins_small.gif","http://www.atkinsglobal.com/");
clearArray = new Array("clear_small.gif","http://www.clearltd.com/");
hrwArray = new Array("hrw_small.gif","http://www.hrwallingford.co.uk/");
mouchelArray = new Array("mouchel_small.jpg","http://www.mouchel.com/");
raaArray = new Array("raa_small.gif","http://www.raaltd.co.uk/");
thamesArray = new Array("thames_small.gif","http://www.thameswater.co.uk");
esriArray = new Array("esri_small.gif","http://www.esriuk.com/");
enginArray = new Array("enginsoft_small.gif","http://www.enginsoft.co.uk");
stormArray = new Array("stormscape_small.gif","http://www.stormscape.co.uk/");
eaArray = new Array("ea_small.gif","http://www.environment-agency.gov.uk/");
hydroArray = new Array("hydro_small.gif","http://www.hydro-international.biz/");
onsiteArray = new Array("onsite_small.gif","http://www.onsite.co.uk");
appliedArray = new Array("applied_computing_small.gif","http://www.acel.co.uk/");

imgArray = new Array(raaArray,stormArray,clearArray,atkinsArray,hrwArray,enginArray,eaArray,hydroArray,onsiteArray,appliedArray);
imgArray.sort(randOrd);

        document.write("<div id='sponsor_strip'>");
            document.write("<p>Organised by:</p>");
            
            document.write("<a href='http://www.innovyze.com'><img src='/images/innovyze_logo.gif' style='border-width:0px' /></a>");
            
            document.write("<p style='margin-top:50px;'>Sponsored by:</p>");
            
            for (i=0;i<imgArray.length;i++){
                document.write("<p style='margin-bottom:30px;'><a href='" + imgArray[i][1] + "' target='_blank'><img src='/images/sponsors/" + imgArray[i][0] + "' style='border-width:0px;' /></a></p>");
            }
            
        document.write("<p><a href='/sponsorship/'>Sponsor this event</a></p></div>");

}

function cancelCheck(){
    return window.confirm("Are you sure you want to cancel your registration?")
}

function backCheck(){
    return window.confirm("Are you sure you want to want to return\n to the previous registration step?")
}

function pageHeader(){
    document.write("<h2 style='margin:0px;'>2011 European Water and Flood Modelling Conference</h2>")
    document.write("<h3 style='margin-top:0px;'>Tortworth Court, South Gloucestershire - 20<sup>th</sup> and 21<sup>st</sup> September 2011</h3>")
}

function sendRegistration(){
    if (document.getElementById){
        if (document.getElementById("saveAndSendDiv").style.visibility == 'visible'){
            document.getElementById("saveAndSendDiv").style.visibility = 'hidden';
        }
        else{
            document.getElementById("saveAndSendDiv").style.visibility = 'visible';
        }
    }
}

function closeSendTo(){
    if (document.getElementById){
        document.getElementById("saveAndSendDiv").style.visibility = 'hidden';
    }
}

function accDateSelected(delegateId){
    if (document.getElementById){
        document.getElementById("accommodation" + delegateId + "_no_accommodation").checked = false;
        document.getElementById("accommodation" + delegateId + "_accommodation").checked = true;
    }
}

function noAccOptionClick(delegateId){
    if (document.getElementById){
        if (document.getElementById("accommodation" + delegateId + "_no_accommodation").checked == true){
            document.getElementById("accommodation" + delegateId + "_accommodation").checked = false;
            
            document.getElementById("accommodation" + delegateId + "_preConfAcc").checked = false;
            document.getElementById("accommodation" + delegateId + "_midConfAcc").checked = false;
            document.getElementById("accommodation" + delegateId + "_postConfAcc").checked = false;
        }
    }
}

function accOptionClick(delegateId){
    if (document.getElementById){
        if (document.getElementById("accommodation" + delegateId + "_accommodation").checked == true){
            document.getElementById("accommodation" + delegateId + "_no_accommodation").checked = false;
        }
    }
}

function listPriceChange(theList){
 if (theList.value == "1"){
    theCost = "£150";
 } else {
    theCost = "£195";
 }
    
 if (document.getElementById){
        document.getElementById("listCost").innerHTML = theCost;
  } else {
    alert("Feature not supported by your browser, cost will be " + theCost + " per delegate");
  }
}
