function load_action(){
	if(typeof phrase_object_array!="undefined"){
		
		if(phrase_object_array.length>0){
		
			next_phrase()
		}
	}
	divert_message()
	
}
var divert_height=0
var divert_change_height=0
var divert_timer=0
function divert_message(){
	if(typeof diverted!="undefined" && !!diverted){
		if(diverted==1){
			var div=document.createElement("div")
			div.id="divert_warning"
			div.style.padding="6px 24px 6px 24px"
			div.style.textAlign="center"
			div.style.backgroundColor="#FC0"
			div.style.borderBottom="1px solid #FFF"
			div.innerHTML="The West Yorkshire Playhouse has changed its domain name from wyplayhouse.com to <strong>wyp.org.uk</strong><br>You have been redirected automatically. Please make a note of the new address and update your bookmark or link to this page."
			div.style.visibility="hidden"
			document.body.insertBefore(div,document.body.firstChild)
			divert_height=div.offsetHeight-12
			divert_change_height=1
			div.style.overflow="hidden"
			div.style.height="1px"
			div.style.visibility="visible"
			
					
			
			
			divert_timer=setInterval(group_divert,20)
		}
	}
	var str='<div id="divert_warning" style="padding: 6px 24px 6px 24px; text-align: center; background-color: #FC0; border-bottom: 1px solid #FFF;">The West Yorkshire Playhouse has changed its domain name from wyplayhouse.com to <strong>wyp.org.uk</strong><br>Please make a note of the new address and update your bookmark or link to this page.</div>'	
}

function group_divert(){
	var div=document.getElementById("divert_warning")
	var inc=5
	if(divert_change_height+inc>=divert_height){
		clearInterval(divert_timer)
		group_divert=0
		div.style.height=divert_height+"px"
	}else{
		divert_change_height=divert_change_height+inc
		div.style.height=divert_change_height.toString()+"px"
		
	}
}

function open_location(thisloc){
	o=0
	if(typeof window.opener!="undefined" && !!window.opener){
		loc=window.opener.document.location.toString()
		if(loc.indexOf("ebulletin/index.asp")){
			o=1
		}
	}
	if(o==0){
		document.location=thisloc
	}else{
		window.opener.document.location=thisloc
	}
}
function open_xml_video(filenam,xmlfile,group){

	MM_openBrWindow(pthstr+"library/video_player/player.asp?filepath="+filenam+"&xmlfile="+xmlfile+"&group="+group,"video","width=300,height=480",1)
}

function open_video(filenam,h1,h2,caption){
	
	//pth="assets/video/"+filenam
	pth=filenam
	if(typeof h2=="undefined"){
		h2=""
	}
	if(typeof caption=="undefined"){
		caption=""
	}
	MM_openBrWindow(pthstr+"library/video_player/player.asp?filepath="+pth+"&h1="+h1+"&h2="+h2+"&caption="+caption,"video","width=300,height=480",1)
}

function FIND(item) {
	if (document.all) return(document.all[item]);
	if (document.getElementById) return(document.getElementById(item));
	return(false);
}
function toggle_div(divID,txtID,roottxt){
	ob=FIND(divID)
	text_ob=FIND(divID+"_content")
	
	if(typeof ob!="undefined" && typeof text_ob!="indefined"){
		txt=text_ob.innerHTML
		if(ob.innerHTML!=""){
			ob.innerHTML=""
			ob.style.visibility="hidden"
			ob.style.overflow="hidden"
			if(typeof roottxt!="undefined"){
				ob=FIND(txtID)
				if(typeof ob!="undefined"){
					if(roottxt!=""){
						ob.innerHTML="Display "+roottxt
					}else{
						ob.innerHTML=" + "
					}
				}
			}
		}else{
			ob.innerHTML=txt
			ob.style.visibility="visible"
			ob.style.overflow="visible"
			if(typeof roottxt!="undefined"){
				ob=FIND(txtID)
				if(typeof ob!="undefined"){
					if(roottxt!=""){
						ob.innerHTML="Hide "+roottxt
					}else{
						ob.innerHTML=" - "
					}
				}
			}
		}
	}
}

function toggle_div2(divID,txtID,roottxt){
	ob=FIND(divID)
	
	if(typeof ob!="undefined"){
	
		if(ob.style.visibility!="hidden"){
			ob.style.visibility="hidden"
			ob.style.height=1
			ob.style.overflow="hidden"
			if(typeof roottxt!="undefined"){
				ob=FIND(txtID)
				if(typeof ob!="undefined"){
					if(roottxt!=""){
						ob.innerHTML="Display "+roottxt
					}else{
						ob.innerHTML=" + "
					}
				}
			}
		}else{
			ob.style.visibility="visible"
			ob.style.overflow="visible"
			if(typeof roottxt!="undefined"){
				ob=FIND(txtID)
				if(typeof ob!="undefined"){
					if(roottxt!=""){
						ob.innerHTML="Hide "+roottxt
					}else{
						ob.innerHTML=" - "
					}
				}
			}
		}
	}
}