// JavaScript Document
<!-- Author: Thejus Philip -->
<!-- Email: thejus at iphilips dot com -->

<!-- Image Preload script -->
<!-- Begin -->
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
			menu_home = newImage("images/menu_home.gif");
			menu_treatments = newImage("images/menu_treatments.gif");
			menu_consulting = newImage("images/menu_consulting.gif");
			menu_contacts = newImage("images/menu_contacts.gif");
			menu_home_over = newImage("images/menu_home_over.gif");
			menu_treatments_over = newImage("images/menu_treatments_over.gif");
			menu_consulting_over = newImage("images/menu_consulting_over.gif");
			menu_contacts_over = newImage("images/menu_contacts_over.gif");
			header_english_button = newImage("images/header_english_button.gif");
			header_english_button_over = newImage("images/header_english_button_over.gif");
			header_nederlands_button = newImage("images/header_nederlands_button.gif");						
			header_nederlands_button_over = newImage("images/header_nederlands_button_over.gif");						
		preloadFlag = true;
	}
}
	preloadImages();
<!-- Image Preload script -->
<!-- End -->
// -->

<!-- Scroll Functionality for New and Events Display -->
<!-- Original Script by: Robert Suppenbach ::webdevel.deezhosts.net -->
<!-- Begin -->

var toScroll=new Array()
var ie=document.all
var dom=document.getElementById
var firstNews_obj;
var secondNews_obj;

function newsScroll(name){
  var c=this; c.name=name; c.mc=0; c.i=2;
  return this;
}

newsScroll.prototype.addItem = function(text,link,font,fontSize,fontStyle){
  var c = this;
  if (link !=''){
    if (font != '')
      toScroll[c.mc]="<a href='"+link+"'><font face='"+font+"' size='"+fontSize+"' Class='"+fontStyle+"'>'"+text+"'</font></a>'";
    else
      toScroll[c.mc]="<a href='"+link+"'><font Class='"+fontStyle+"'>"+text+"</font></a>";
  }
  else { 
    if (font != '')
      toScroll[c.mc]="<font face='"+font+"' size='"+fontSize+"' Class='"+fontStyle+"'>"+text+"</font>";
    else
      toScroll[c.mc]="<font Class='"+fontStyle+"'>"+text+"</font>";
  }
  c.mc++;
}

newsScroll.prototype.construct = function(){
  var c = this; theWidth = c.scrollerwidth; theHeight=c.scrollerheight; thebgColor = c.scrollerbgcolor; theBackground =c.scrollerbackground; theDelay=c.scrollerdelay;
  scroll_obj=eval(c.name);        
  if (ie||dom){
    document.writeln('<div id="main2" style="position:relative;width:'+theWidth+';height:'+theHeight+';overflow:hidden;background-color:'+thebgColor+' ;background-image:url('+theBackground+')">')
    document.writeln('<div style="position:absolute;width:'+theWidth+';height:'+theHeight+';clip:rect(0 '+theWidth+' '+theHeight+' 0);left:0;top:0">')
    document.writeln('<div id="firstNews" style="position:absolute;width:'+theWidth+';left:0;top:1">')
    document.write(toScroll[0])
    document.writeln('</div>')
    document.writeln('<div id="secondNews" style="position:absolute;width:'+theWidth+';left:0;top:0;visibility:hidden">')
    document.write(toScroll[dyndetermine=(toScroll.length==1)? 0 : 1])
    document.writeln('</div>')
    document.writeln('</div>')
    document.writeln('</div>')
  }
}

newsScroll.prototype.move = function(whichdiv){
  var c = this; theDelay = c.scrollerdelay; theHeight = c.scrollerheight; 
  scroll_obj=eval(c.name);
  tdiv=eval(whichdiv)

  if (parseInt(tdiv.style.top)>0&&parseInt(tdiv.style.top)<=5){
    tdiv.style.top=0+"px"
    setTimeout("scroll_obj.move(tdiv)",theDelay)
    setTimeout("scroll_obj.move2(secondNews_obj)",theDelay)
    //document.write('Got Milk?')
  return
  }
  if (parseInt(tdiv.style.top)>=tdiv.offsetHeight*-1){
    tdiv.style.top=parseInt(tdiv.style.top)-5+"px"
    setTimeout("scroll_obj.move(tdiv)",50)
  }
  else {
    tdiv.style.top=parseInt(theHeight)+"px"
    tdiv.innerHTML=toScroll[c.i]
    if (c.i==toScroll.length-1)
      c.i=0
    else
      c.i++
  }
}

newsScroll.prototype.move2 = function(whichdiv){
  var c = this; theDelay = c.scrollerdelay; theHeight= c.scrollerheight;
  scroll_obj=eval(c.name);
  tdiv2=eval(whichdiv)

  if (parseInt(tdiv2.style.top)>0&&parseInt(tdiv2.style.top)<=5){
    tdiv2.style.top=0+"px"
    setTimeout("scroll_obj.move2(tdiv2)",theDelay)
    setTimeout("scroll_obj.move(firstNews_obj)",theDelay)
    return
  }
  if (parseInt(tdiv2.style.top)>=tdiv2.offsetHeight*-1){
    tdiv2.style.top=parseInt(tdiv2.style.top)-5+"px"
    setTimeout("scroll_obj.move2(secondNews_obj)",50)
  }
  else {
    tdiv2.style.top=parseInt(theHeight)+"px"
    tdiv2.innerHTML=toScroll[c.i]
    if (c.i==toScroll.length-1)
      c.i=0
    else
      c.i++
  }
}

newsScroll.prototype.startScroll = function(){
  var c = this;
  scroll_obj=eval(c.name);        
  
  if (toScroll.length >2)
    c.i = 2;
  else
    c.i = 0;
  
  firstNews_obj=ie? firstNews : document.getElementById("firstNews")
  secondNews_obj=ie? secondNews : document.getElementById("secondNews")
  setTimeout("scroll_obj.move(firstNews_obj)",c.scrollerDelay);
  secondNews_obj.style.top=theHeight;
  secondNews_obj.style.visibility='visible'
}
<!-- End -->
<!-- URL Definitions -->
<!-- Begin -->
var urlArray = new Array();
<!-- English URLs -->
urlArray['home'] = "./index.html";
urlArray['treatments'] = "./treatments.html";
urlArray['team'] = "./team.html";
urlArray['consulting'] = "./consulting.asp";
urlArray['contacts'] = "./contacts.asp";
urlArray['profile'] = "./ayurvedicdetails.html";
urlArray['newsItem01'] = "./newsitems01.html";
urlArray['newsItem02'] = "./newsitems02.html";

<!-- Nederlands URLs -->
urlArray['home_nl'] = "./index_nl.html";
urlArray['treatments_nl'] = "./treatments_nl.html";
urlArray['team_nl'] = "./team_nl.html";
urlArray['consulting_nl'] = "./consulting_nl.asp";
urlArray['contacts_nl'] = "./contacts_nl.asp";
urlArray['profile_nl'] = "./ayurvedicdetails_nl.html";
urlArray['newsItem01_nl'] = "./newsitems01_nl.html";
urlArray['newsItem02_nl'] = "./newsitems02_nl.html";

function openURL(param){
	document.location.href=urlArray[param];
	<!--if (param == 'home_nl' | param == 'treatments_nl' | param == 'team_nl' | param == 'consulting_nl' | param == 'contacts_nl' | param == 'profile_nl' | param == 'newsItem01_nl' | param == 'newsItem02_nl')-->
	<!--{-->
		<!--alert("Dutch Translation coming soon.");-->
	<!--}-->
<!--if (param == 'consulting' | param == 'contacts')-->
<!--{-->
	<!--alert("At this moment we have some problems receiving mails. Please call us if you want to have information: +31 (0)20 4715174");-->
<!--}-->
	
<!--if (param == 'consulting_nl' | param == 'contacts_nl')-->
<!--{-->
	<!--alert("Op dit moment zijn er wat problemen met het ontvangen van e-mails. Voor informatie kunt u contact opnemen tel: +31 (0)20 4715174");-->
<!--}-->
	
}

<!-- End -->
//  End -->



