﻿/*****************************************************
Update Schedule info
******************************************************/

function setInnerText (elementId, text) {
  var element;
  if (document.getElementById) {
    element = document.getElementById(elementId); 
    }
  else if (document.all) {
    element = document.all[elementId];
    }
  if (element) {
   if (typeof element.textContent != 'undefined') {
     element.innerHTML = text;
     }
   else if (typeof element.innerHTML != 'undefined') {
     element.innerHTML = text;
     }
 else if (typeof element.removeChild != 'undefined') {
   while (element.hasChildNodes()) {
     element.removeChild(element.lastChild);
     }
  element.appendChild(document.createTextNode(text)) ;
    
   }
 }
}

	/****************************************************
	Open window code
	****************************************************/
	function openWindow(sUrl,sTarget,sOptions){
		window.open(sUrl, sTarget, sOptions);
	}
	
	function popUp(page, name, w, h, winl, wintop, tools, scroll){
	       var wint = (screen.height - h) / 2;
       	winprop  = 'height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar='+tools+',resizable'+',scrollbars='+scroll;      
       	var win = window.open(page, name, winprop);
       	if (parseInt(navigator.appVersion) >= 4) 
       	 { 
                win.window.focus(); 
       	 }
	}
	
	function popUpCenter(page, name, w, h, tools) 
    	{
        var winl = (screen.width - w) / 2;
        var wint = (screen.height - h) / 2;
        winprop  = 'height='+h+',width='+w+',top='+wint+',left='+winl+',toolbar='+tools+',resizable'+',scrollbars=yes';      
        var win = window.open(page, name, winprop);
        if (parseInt(navigator.appVersion) >= 4) 
       	 { 
                win.window.focus(); 
       	 }
    	} 
	
	function viewTour(page){
	var wint = (screen.height - 500) / 2;
	var winl = (screen.width - 640) /2;
       	winprop  = 'height=500,width=640,top='+wint+',left='+winl+',toolbar=no,resizable,scrollbars=yes';      
       	var win = window.open(page, 'tour', winprop);
       	if (parseInt(navigator.appVersion) >= 4) 
       	 { 
                win.window.focus(); 
       	 }
	}

	function viewBio(page){
	var wint = (screen.height - 500) / 2;
	var winl = (screen.width - 700) /2;
       	winprop  = 'height=500,width=700,top='+wint+',left='+winl+',toolbar=no,resizable,scrollbars=yes';      
       	var win = window.open(page, 'bio', winprop);
       	if (parseInt(navigator.appVersion) >= 4) 
       	 { 
                win.window.focus(); 
       	 }
	}

	function viewVideo(page){
	var wint = (screen.height - 500) / 2;
	var winl = (screen.width - 600) /2;
       	winprop  = 'height=700,width=640,top='+wint+',left='+winl+',toolbar=yes,resizable,scrollbars=yes';      
       	var win = window.open(page, 'video', winprop);
       	if (parseInt(navigator.appVersion) >= 4) 
       	 { 
                win.window.focus(); 
       	 }
	}

	function viewCourse(page){
        var wint = (screen.height - 350) / 2;
       	winprop  = 'height=350,width=550,top='+wint+',left=140,toolbar=no,resizable,scrollbars=no';      
       	var win = window.open(page, 'course', winprop);
       	if (parseInt(navigator.appVersion) >= 4) 
       	 { 
                win.window.focus(); 
       	 }
	}

	function viewHotel(page){
	var wint = (screen.height - 500) / 2;
	var winl = (screen.width - 500) /2;
       	winprop  = 'height=500,width=500,top='+wint+',left='+winl+',toolbar=no,resizable,scrollbars=yes';      
       	var win = window.open(page, 'tour', winprop);
       	if (parseInt(navigator.appVersion) >= 4) 
       	 { 
                win.window.focus(); 
       	 }
	}


	function viewCard(page){
        var wint = (screen.height - 300) / 2;
       	winprop  = 'height=300,width=700,top='+wint+',left=140,toolbar=no,resizable,scrollbars=no';      
       	var win = window.open(page, 'course', winprop);
       	if (parseInt(navigator.appVersion) >= 4) 
       	 { 
                win.window.focus(); 
       	 }
	}


