

/***** Blend Transitions *****/

//fade div script
function opacity(id, opacStart, opacEnd, millisec) {
	//speed for each frame
	var speed = Math.round(millisec / 100);
	var timer = 0;

	//determine the direction for the blending, if start and end are the same nothing happens
	if(opacStart > opacEnd) {
		for(i = opacStart; i >= opacEnd; i--) {
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	} else if(opacStart < opacEnd) {
		for(i = opacStart; i <= opacEnd; i++) {
			setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
			timer++;
		}
	}
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
	var object = document.getElementById(id).style; 
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
}


/***** Rollover Effects *****/
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
	/***** Sub Nav Effects *****/

	function subMenu( id ) {
		//loop through the array and hide each element by id
		if ( id == "subDesign" )			{ var ids=new Array( 'subHomes','subLocation','subNews','subContact','subRegistration' ); }
		if ( id == "subHomes" )		{ var ids=new Array( 'subDesign','subLocation','subNews','subContact','subRegistration' ); }
		if ( id == "subLocation" )		{ var ids=new Array( 'subDesign','subHomes','subNews','subContact','subRegistration' ); }
		if ( id == "subNews" )			{ var ids=new Array( 'subDesign','subHomes','subLocation','subContact','subRegistration' ); }
		if ( id == "subContact" )		{ var ids=new Array( 'subDesign','subHomes','subLocation','subNews','subRegistration' ); }
		if ( id == "subRegistration" )	{ var ids=new Array( 'subDesign','subHomes','subLocation','subNews','subContact' ); }
		function hidediv( id ) {
		   //safe function to hide an element with a specified id
		   if ( document.getElementById ) {
			/* DOM3 = IE5, NS6 */ document.getElementById( id ).style.display = 'none';
		   } else {
			   if ( document.layers ) {
				/* Netscape 4 */ document.id.display = 'none';
			   } else {
				/* IE 4 */ document.all.id.style.display = 'none';
			   }
			}
		   }
		for ( var i=0; i<ids.length; i++ ) { hidediv( ids[ i ] ); }
		if( document.getElementById( id ).style.display == 'none' ) { document.getElementById( id ).style.display = 'block'; return; }
		if( document.getElementById( id ).style.display == 'block' ) { document.getElementById( id ).style.display = 'none'; return; }
	}


/***** Image Preloader *****/
function imgLoad() {
	nav01_off	= new Image();	nav01_off.src		= "images/nav01_off.gif";
	nav01_on	= new Image();	nav01_on.src		= "images/nav01_on.gif";
	nav02_off	= new Image();	nav02_off.src		= "images/nav02_off.gif";
	nav02_on	= new Image();	nav02_on.src		= "images/nav02_on.gif";
	nav03_off	= new Image();	nav03_off.src		= "images/nav03_off.gif";
	nav03_on	= new Image();	nav03_on.src		= "images/nav03_on.gif";
	nav04_off	= new Image();	nav04_off.src		= "images/nav04_off.gif";
	nav04_on	= new Image();	nav04_on.src		= "images/nav04_on.gif";
	nav05_off	= new Image();	nav05_off.src		= "images/nav05_off.gif";
	nav05_on	= new Image();	nav05_on.src		= "images/nav05_on.gif";
	nav06_off	= new Image();	nav06_off.src		= "images/nav06_off.gif";
	nav06_on	= new Image();	nav06_on.src		= "images/nav06_on.gif";
}

/***** Show/Hide Questions (Info FAQ) *****/
function ShowHideSteps( id ) {
	//loop through the array and hide each element by id
	if( id == "q1" )	{	var ids=new Array( 'q2', 'q3', 'q4', 'q5', 'q6', 'q7', 'q8', 'q9', 'q10', 'q11', 'q12', 'q13' );	}
	if( id == "q2" )	{	var ids=new Array( 'q1', 'q3', 'q4', 'q5', 'q6', 'q7', 'q8', 'q9', 'q10', 'q11', 'q12', 'q13' );	}
	if( id == "q3" )	{	var ids=new Array( 'q1', 'q2', 'q4', 'q5', 'q6', 'q7', 'q8', 'q9', 'q10', 'q11', 'q12', 'q13' );	}
	if( id == "q4" )	{	var ids=new Array( 'q1', 'q2', 'q3', 'q5', 'q6', 'q7', 'q8', 'q9', 'q10', 'q11', 'q12', 'q13' );	}
	if( id == "q5" )	{	var ids=new Array( 'q1', 'q2', 'q3', 'q4', 'q6', 'q7', 'q8', 'q9', 'q10', 'q11', 'q12', 'q13' );	}
	if( id == "q6" )	{	var ids=new Array( 'q1', 'q2', 'q3', 'q4', 'q5', 'q7', 'q8', 'q9', 'q10', 'q11', 'q12', 'q13' );	}
	if( id == "q7" )	{	var ids=new Array( 'q1', 'q2', 'q3', 'q4', 'q5', 'q6', 'q8', 'q9', 'q10', 'q11', 'q12', 'q13' );	}
	if( id == "q8" )	{	var ids=new Array( 'q1', 'q2', 'q3', 'q4', 'q5', 'q6', 'q7', 'q9', 'q10', 'q11', 'q12', 'q13' );	}
	if( id == "q9" )	{	var ids=new Array( 'q1', 'q2', 'q3', 'q4', 'q5', 'q6', 'q7', 'q8', 'q10', 'q11', 'q12', 'q13' );	}
	if( id == "q10" )	{	var ids=new Array( 'q1', 'q2', 'q3', 'q4', 'q5', 'q6', 'q7', 'q8', 'q9',  'q11', 'q12', 'q13' );	}
	if( id == "q11" )	{	var ids=new Array( 'q1', 'q2', 'q3', 'q4', 'q5', 'q6', 'q7', 'q8', 'q9',  'q10', 'q12', 'q13' );	}
	if( id == "q12" )	{	var ids=new Array( 'q1', 'q2', 'q3', 'q4', 'q5', 'q6', 'q7', 'q8', 'q9',  'q10', 'q11', 'q13' );	}
	if( id == "q13" )	{	var ids=new Array( 'q1', 'q2', 'q3', 'q4', 'q5', 'q6', 'q7', 'q8', 'q9',  'q10', 'q11', 'q12' );	}
	function hidediv( id ) {
	   //safe function to hide an element with a specified id
	   if( document.getElementById ) { /* DOM3 = IE5, NS6 */ document.getElementById( id ).style.display = 'none'; }
	   else {
		if( document.layers ) { /* Netscape 4 */ document.id.display = 'none'; }
		else { /* IE 4 */ document.all.id.style.display = 'none'; }
	   }
	}
	for( var i=0; i<ids.length; i++ ) { hidediv( ids[ i ] ); }
	if( document.getElementById( id ).style.display == 'none' ) { document.getElementById( id ).style.display = 'block'; return; }
	if( document.getElementById( id ).style.display == 'block' ) { document.getElementById( id ).style.display = 'none'; return; }
}











