﻿function noSpam(en,dn){
	document.write("<A href=\"ma"+"ilt"+"o:"+en+"@"+dn+"\" class=\"lnk\">"+en+"@"+dn+"</A>");
}
function nos_pam(en,dn){
	document.write("<A href=\"ma"+"ilt"+"o:"+eml[en]+"@"+dn+"\" class=\"lnk\">"+eml[en]+"@"+dn+"</A>");
}
function emailTo(en,dn){
	document.write("<A href=\"ma"+"ilt"+"o:"+en+"@"+dn+"\" class=\"lnk\">Email</A>");
}
var eml=new Array(); 
eml[1]="joe";
eml[2]="dana";
eml[3]="mconrad"; 
eml[4]="alessandro.haab";
eml[5]="thinada";
eml[6]="alank";
eml[7]="";
eml[8]=""; 
eml[9]="";
eml[10]="";
function toolPrint(){ window.print(); }
function toolAddFavorite(){
	bookmarkurl=location.href;
	bookmarktitle=document.title;
	if (document.all)
	window.external.AddFavorite(bookmarkurl,bookmarktitle);
	else if (window.sidebar) // firefox
	window.sidebar.addPanel(bookmarktitle, bookmarkurl, "");
}
var cntH1FontSize=16;
var cntBodyFontSize=10;
function toolLargerText(){
	cntBodyFontSize++;
	document.getElementById('ContentBody').style.fontSize=cntBodyFontSize+"pt";
	cntH1FontSize++;
	document.getElementById('ContentH1').style.fontSize=cntH1FontSize+"pt";
}
function toolSmallerText(){
	cntBodyFontSize--;
	document.getElementById('ContentBody').style.fontSize=cntBodyFontSize+"pt";
	cntH1FontSize--;
	document.getElementById('ContentH1').style.fontSize=cntH1FontSize+"pt";
}
function toolMailtoFriend(){
	mail_str = "mailto:?";
	mail_str += "body=" + "You have been sent a link from Chaine des Rotisseurs Thailand ";
	location.href = mail_str;
}
var audioengine='wm';
var pageSoundStatus=1;
var brwsr='other';
if (navigator.userAgent.indexOf('MSIE') != -1){brwsr='MSIE';}
else if (navigator.userAgent.indexOf('Chrome') != -1){brwsr='Chrome';}
else if (navigator.userAgent.indexOf('Firefox') != -1){brwsr='Firefox';}
var rn=0
var setInt;
function swfloopInterval(){
	setInt=self.setInterval( "swfloopautostart()", 500 );
}
function swfloopautostart(){
	if(pageSoundStatus==1){
		//rn=rn+1;
		//document.getElementById('testout').innerHTML=''+rn+':'+swfsound.getPosition(id_sound1);
		if(swfsound.getPosition(id_sound1)==swfsound.getDuration(id_sound1)|| swfsound.getPosition(id_sound1)==0 ){
			swfsound.startSound( id_sound1,0.00,1);
		}
	}
}
function toolSoundOnOff(){
	if(pageSoundStatus==0){
		// check if method if available
		if(audioengine=='swfsoundchild'){
			var x=document.getElementById("audioch");
			var y=(x.contentWindow || x.contentDocument); //alert(y.audioengine);
			y.swfsound.startSound( y.id_sound1,0.00,1);
		}
		else if(audioengine=='swfsound'){
			//swfloopautostart();
			swfsound.startSound( id_sound1,0.00,1);
		}
		else{
			if(brwsr=='MSIE'){
				if (AudioPlayer.controls.isAvailable('Play')){
					// start playback
					AudioPlayer.controls.play();
				}
			}
			else{
				document.getElementById('AudioPlayerEmbed').setAttribute("AUTOSTART", "0");
			}
		}
		pageSoundStatus=1;
		document.getElementById('imgSoundCntrl').setAttribute("src", "./images/tool-6.gif");
		document.getElementById('lnkSoundCntrl').setAttribute("title", "Now playing (click to turn off)");		
	}
	else{
		// check if method if available
		if(audioengine=='swfsoundchild'){
			var x=document.getElementById("audioch");
			var y=(x.contentWindow || x.contentDocument); //alert(y.audioengine);
			y.swfsound.stopSound( y.id_sound1 );
		}
		else if(audioengine=='swfsound'){
			swfsound.stopSound( id_sound1 );
		}
		else{
			if(brwsr=='MSIE'){
				if (AudioPlayer.controls.isAvailable('Stop')){
					// stop playback
					AudioPlayer.controls.stop();
				}
			}
			else{
				document.getElementById('AudioPlayerEmbed').setAttribute("AUTOSTART", "1");
			}
		}
		pageSoundStatus=0;
		document.getElementById('imgSoundCntrl').setAttribute("src", "./images/tool-60.gif");
		document.getElementById('lnkSoundCntrl').setAttribute("title", "Not playing now (click to turn on)");		
	}
}


