/****************************************
|
| Entrepreneur London
| Created by: Kevin Biskaborn
| Copyright 2009 ScriptReaction
| http://www.scriptreaction.com
|
****************************************/

var active = {
	execPrint: function (){
		window.print();	
	},
	execReset: function (){
		document.dataForm.executeReset.value = 1;
	},
	getResults: function ( type ){
		top.location.href = "../" + type + "/";
	},
	getResponse: function (){
		top.location.href = "../../response/";
	},
	optPanels: {
		toggle: function ( id ){
			if( this.get.state( id ) )
				this.doClose( id );
			else
				this.doOpen( id );
		},
		get: {
			state: function ( id ){
				return ( this.bar( id ).className == "opened" ) ? true : false;
			},
			bar: function ( id ){
				return document.getElementById( "optionPanel_" + id + "_bar" )
			},
			toggleArea: function ( id ){
				return document.getElementById( "optionPanel_" + id + "_toggle" )
			}
		},
		doOpen: function ( id ){
			var bar = this.get.bar( id );
			var txt = bar.innerHTML;
			
			this.get.toggleArea( id ).style.display = "block";
			bar.className = "opened";
			bar.innerHTML = "Hide" + txt.slice( 4, txt.length );
		},
		doClose: function ( id ){
			var bar = this.get.bar( id );
			var txt = bar.innerHTML;
			
			this.get.toggleArea( id ).style.display = "none";
			bar.className = "closed";
			bar.innerHTML = "Show" + txt.slice( 4, txt.length );
		}
	}
}




