function textMenu_home(){
} 

function textMenu_cme(){
} 

var urlVar; 

function makeUrlVar(x,y){ 
	if( document.all ){ 
		urlVar = "http://www.mssmtv.org/conferences/template/frameset_clipstream.html?folder=" + x + "&doctor=" + y; 
	} else { 
		urlVar = "http://www.mssmtv.org/conferences/template/frameset_clipstream_NS.html?folder=" + x + "&doctor=" + y;
	} 
	openCSUrl(urlVar);
} 

//CENTERS presentation window
function openUrl(urlVar){
var popup_width=730;
    var popup_height=580;
    var screen_width=window.screen.width;
    var screen_height=window.screen.height;
    var popup_left=Math.round((screen_width-popup_width)/2);
    var popup_top=Math.round((screen_height-popup_height)/2); 	
    window.open(urlVar,'',"height=" + popup_height + ",width=" + popup_width + 
	",resizable=no,left="+ popup_left + ",top=" +popup_top+ ",scrollbars=no");
} 

//CENTERS presentation window (Duplicate of function above)
function openCSUrl(urlVar){
	var popup_width=730;
    var popup_height=580;
    var screen_width=window.screen.width;
    var screen_height=window.screen.height;
    var popup_left=Math.round((screen_width-popup_width)/2);
    var popup_top=Math.round((screen_height-popup_height)/2); 	
    window.open(urlVar,'',"height=" + popup_height + ",width=" + popup_width + 
	",resizable=no,left="+ popup_left + ",top=" +popup_top+ ",scrollbars=no");
}

//POPUP with scroll bars and variable size
function popup(urlVar,x,y){
	var popup_width=x;
    var popup_height=y;
    var screen_width=window.screen.width;
    var screen_height=window.screen.height;
    var popup_left=Math.round((screen_width-popup_width)/2);
    var popup_top=Math.round((screen_height-popup_height)/2); 	
    window.open(urlVar,'',"height=" + popup_height + ",width=" + popup_width + ",resizable=no,left="+ 
    popup_left + ",top=" +popup_top+ ",scrollbars=1");

}

//POPUP with scroll bars, toolbar(IE, back button) and variable size
function popupreg(urlVar,x,y){
	var popup_width=x;
    var popup_height=y;
    var screen_width=window.screen.width;
    var screen_height=window.screen.height;
    var popup_left=Math.round((screen_width-popup_width)/2);
    var popup_top=Math.round((screen_height-popup_height)/2); 	
    window.open(urlVar,'',"height=" + popup_height + ",width=" + popup_width + ",resizable=no,left="+ 
    popup_left + ",top=" +popup_top+ ",scrollbars=1, toolbar=1");

}

function makeVideoUrlVar(x,y){
	urlVar = "../../videotemplate/video_template.html?folder=" + x + "&doctor=" + y;
	openVidUrl(urlVar,750,400);
}

function openVidUrl(urlVar,x,y){
var popup_width=x;
    var popup_height=y;
    var screen_width=window.screen.width;
    var screen_height=window.screen.height;
    var popup_left=Math.round((screen_width-popup_width)/2);
    var popup_top=Math.round((screen_height-popup_height)/2); 	
    window.open(urlVar,'',"height=" + popup_height + ",width=" + popup_width + 
   ",resizable=no,left="+ popup_left + ",top=" +popup_top+ ",scrollbars=no");
}

//HTML MARKUP for admin forms
function markup( x, y ){
	if( y == 'course_objectives' ){
		current = document.forms.addcourse.course_objectives.value;		
		document.forms.addcourse.course_objectives.value = current + x;
	} else {
		current = document.forms.addcourse.course_audience.value;		
		document.forms.addcourse.course_audience.value = current + x;	
	}			
}
	
function printout( x ){
	if( x == 'course_objectives' ){
		text = document.forms.addcourse.course_objectives.value;
	} else {
		text = document.forms.addcourse.course_audience.value;
	}
	
	document.write(text);
}

// SUPPRESS FORM submission
// add onKeyPress="return checkEnter(event);" to all input fields, ie
// <input type="text" name="text1" onKeyPress="return checkEnter(event);"> 
// script from jennifermadden.com 
function checkEnter(e){
	var characterCode;
	if( e && e.which ){ //if which property of event object is supported (NN4)
		e = e;
		characterCode = e.which; //character code is contained in NN4's which property
	} else {							
		e = event;						
		characterCode = e.keyCode; //character code is contained in IE's keyCode property
	}
 
	if( characterCode == 13 ){ //if generated character code is equal to ascii 13 (if enter key)
		return false 
	} else {
		return true 
	} 
}