<!--
// -------------------------------------------
// <SCRIPT SRC="../cgi/Behaviour.js"></SCRIPT> 
// in pages head section where required

// Popup window
function newWin(link,w,h,s,r) {
  var winFeatures='width='+w+',height='+h+',scrollbars='+s+',resizable='+r;
  var bookWindow=window.open(link, "", winFeatures);
}

//Disable select-text script IE4 & NS6
function disableselect(w){
	return false
} 
  
function reEnable(){
	return true
} 
  
//if IE4+
document.onselectstart=new Function ("return false") 
  
//if NS6
if (window.sidebar){
	document.onmousedown=disableselect
	document.onclick=reEnable
}


//Disable right click
var message="";
function clickIE() {
	if (document.all){
		(message);return false;
	}
}
function clickNS(e) {
	if (document.layers||(document.getElementById&&!document.all)) {
		if (e.which==2||e.which==3) {
			(message);return false;
		}
	}
}
if (document.layers) {
	document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
} else {
	document.onmouseup=clickNS;document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")
//-------------------------------------------


// Spotlight
if (document.all&&window.spotlight){
	var x=new Array()
	var direction=new Array()
	var y=new Array()
	if (spotlight.length==null){
		spotlight[0]=document.all.spotlight
		x[0]=0
		direction[0]="right"
		y[0]=spotlight[0].height
		spotlight[0].filters.light.addPoint(100,50,100,255,255,255,90)
	}
	else
	for (i=0;i<spotlight.length;i++){
		x[i]=0
		direction[i]="right"
		y[i]=spotlight[i].height
		spotlight[i].filters.light.addPoint(100,50,100,255,255,255,90)
	}
}

function slidelight(cur){
	spotlight[cur].filters.light.MoveLight(0,x[cur],y[cur],200,-1)

	if (x[cur]<spotlight[cur].width+200&&direction[cur]=="right") x[cur]+=10
	else if (x[cur]>spotlight[cur].width+200){
		direction[cur]="left"
		x[cur]-=10
	} else if (x[cur]>-200&&x[cur]<-185){
		direction[cur]="right"
		x[cur]+=10
	}else{
		x[cur]-=10
		direction[cur]="left"
	}
}

if (document.all&&window.spotlight){
	if (spotlight.length==null)
		setInterval("slidelight(0)",spotlight[0].speed)
	else for (t=0;t<spotlight.length;t++){
		var temp='setInterval("slidelight('+t+')",'+spotlight[t].speed+')'
		eval(temp)
	}
}
// ---------------------------------
// #spotlight{filter:light} instyle section of Head


function makesound(soundobj){
   var thissound= eval("document."+soundobj);
   thissound.play();
}

// Sound
// <bgsound src="#" id="soundeffect" loop=1 autostart="true">


//var soundfile="Qxp/Sounds/Msound.wav" //path to sound file, or pass in filename directly into playsound()

function playsound(soundfile){
   if (document.all && document.getElementById){
      document.getElementById("soundeffect").src="" //reset first in case of problems
      document.getElementById("soundeffect").src=soundfile
   }
}

function bindsound(tag, soundfile, masterElement){
   if (!window.event) return
   var source=event.srcElement
   while (source!=masterElement && source.tagName!="HTML"){
      if (source.tagName==tag.toUpperCase()){
	       playsound(soundfile)
         break
      }
      source=source.parentElement
   }
}

//-------------------------------------------------------

// Create Bookmark
function bookmarksite(title, url) {
  if (document.all) {
    window.external.AddFavorite(url, title);
  } else if (window.sidebar) {
    window.sidebar.addPanel(title, url, '');
  }
}

//Set Status Bar Text
function FP_setStatusBarText(txt) {   //v1.0
 window.status=txt;
}


-->
