/** 
* WEBSITE	: http://www.primezero.com
**/

// Section I: Main Function
// *******************************************************************


// startHelpMenu(urlToStartHelp)
// Opens Context Help Menu To StartPage given by urlToStartHelp
// Resizes Main Window to make room for Help Window on the right side
// Function Returns No Values.

function startHelpMenu(urlToStartHelp) {

// the name of your help menu's start page
var helpStartPage	= urlToStartHelp;

// the width of your context help menu system
var helpMenuWidth 	= "350";




/* Warning! Don't modify below this point...
....unless you know what you are doing **/

// finding the width and height of the user's screen
var browserWidth	= window.screen.availWidth;
var browserHeight 	= window.screen.availHeight;

// starts where the main window ends
var mainWindowWidth	= browserWidth - helpMenuWidth;

// top of the screen
var upperEdge 		= 0;



// ** Tells us how to treat CONTEXT HELP WINDOW ** //

// window properties
winProperties = 'height='+browserHeight+',width='+helpMenuWidth+',top='+upperEdge+',left='+mainWindowWidth+',scrollbars,status,resizable'

// makes the new window
myHelpWindow = window.open(helpStartPage, "helpWindow", winProperties);

// resizes the Help Window
myHelpWindow.resizeTo(helpMenuWidth, browserHeight);

// moves the Help Window the right side
myHelpWindow.moveTo(mainWindowWidth, upperEdge);

// brings the Help Window to users attention
myHelpWindow.focus();



// ** This tells us how to treat the MAIN WINDOW ** //

// resizes the Main Window 
self.resizeTo(mainWindowWidth, browserHeight);

// moves the Main Window to left/top corner
self.moveTo(0, 0);

} // end of startHelpMenu




// Section II: SubFunctions
// *******************************************************************

// closeByClickingLink()
// Restores Main Window To Maximum Width And Height
// Function Returns No Values.
function closeByClickingLink() {

	// finding the width and height of the screen
	var w = window.screen.availWidth;
	var h = window.screen.availHeight;

	// window will close itself
	self.close();
	// window will then have common courtesy to resize main Window
	opener.window.resizeTo(w,h);
	
} // ends function closeByClickingLink



// jumpingJiving(urlToGo)
// Helps User Jump To A Url Given By "Urltogo"
// Function Returns No Values.
function jumpingJiving(urlToGo) {

	// sends the main Window to the desired link
	opener.location.href = urlToGo;

}  // ends function jumpingJiving
