var isNav, isIE, isN6;
var coll = "";
var styleObj = "";
 
if( navigator.appName == "Netscape"){
	if ( parseInt( navigator.appVersion ) >= 5 ){
		isN6 = true;
		//styleObj = ".style";
		//coll = "getElementById(";
		//styleObj = ").style";
	}
	else
		isNav = true;
	
}
else{
	isIE = true;
	coll = "all.";
	styleObj = ".style";
}

function getObject( obj ){
	var theObj, temp;
	//if( isN6 ){
		//theObj = document.getElementById( obj )
		//alert( theObj );
	//}
	if(typeof obj == "string"){
		if( isN6 ){
			theObj = document.getElementById( obj ).style;
			//theObj = eval("document."+obj+".style");
			//alert( theObj );
		}
		else
			theObj = eval("document."+coll+obj+styleObj);
	}else{
		theObj = obj;
	}
	return theObj;
}


function hide( obj ){
		var theObj = getObject(obj);
		theObj.visibility = "hidden";

}


function show( obj ){
		var theObj = getObject(obj);
		theObj.visibility = "visible";
}




var timer;
var timer2;
var current_mm;
var current_sm;
var current_sm2;
tempSub = "";
tempMM = "";
tempSub2 = "";



function stopClock(){
	clearTimeout( timer );
	
}

function setClock(){
	timer = setTimeout( "closeMenu()", 1000 );
}

function closeMenu(){

	rollOver( 'services', 'images/menu/services.gif' );
	hide( "men6" );
	hide( "men7" );
	hide( "men8" );
	//hide( "men10" );
}



function swap( showstr, hidestr ){
	hide(hidestr);
	show(showstr);

}


testvar = "";


function playmovie() { 
  
  //URL = "movietemplate.htm"
 
  
  d = document.jumpform.jumpmenu;
	//only jump if its a valid link
	if(d.selectedIndex != 0){
		
		if(d.options[d.selectedIndex].value != ""){
			//go to page
			temp = d.options[d.selectedIndex].value;
			URL = "http://reflectionfilmsonline.com/movie.php?id=" + temp;
			 var newWin3 = window.open(URL,"newWin3","toolbar=no,scrollbars=no,width=469,height=469,location=no");
 			newWin3.focus();
			
		}
	}

}

function mailinglist() { 
  URL = "mailinglist.php";
  //URL = "movietemplate.htm"
  var newWin3 = window.open(URL,"newWinML","toolbar=no,scrollbars=no,width=469,height=469,location=no");
  newWinML.focus();
  

}

function registration() { 
  URL = "workshopregistration.php";
  //URL = "movietemplate.htm"
  var newWin3 = window.open(URL,"newWinML","toolbar=no,scrollbars=no,width=469,height=469,location=no");
  newWinML.focus();
  

}

function policies() { 
  URL = "workshoppolicies.htm";
  //URL = "movietemplate.htm"
  var newWin3 = window.open(URL,"newWinML","toolbar=no,scrollbars=yes,width=469,height=469,location=no");
  newWinML.focus();
  

}

function viewTestimonials(){
	 URL = "testimonials.htm";
  	//URL = "movietemplate.htm"
  	var newWin4 = window.open(URL,"newWinML2","toolbar=no,scrollbars,width=479,height=450,location=no");
  	newWinML2.focus();

}

function viewBusTestimonials(){
	 URL = "testimonialsbus.htm";
  	//URL = "movietemplate.htm"
  	var newWin4 = window.open(URL,"newWinML2","toolbar=no,scrollbars,width=479,height=450,location=no");
  	newWinML2.focus();

}


function rollOver( imageName, imageSrc ){
		if( imageName == "services"){
			stopClock();
			show( "men6" );
			show( "men7" );
			show( "men8" );
			//show( "men10" );
		}else{
			closeMenu()
		}
		document[imageName].src = imageSrc;

}


function rollOver2( imageName, imageSrc ){

		document[imageName].src = imageSrc;

}


function subrollOver( imageName, imageSrc ){
		rollOver( 'services', 'images/menu/serviceson.gif' );
		document[imageName].src = imageSrc;
		stopClock();

}

function subrollOut( imageName, imageSrc ){
		rollOver( 'services', 'images/menu/serviceson.gif' );
		document[imageName].src = imageSrc;
		setClock();
}

