// JavaScript Document
/** -- Utility functions -- **/
//get the window properties
window.getBrowser = function ( )
{
	this.winName = navigator.appName;
	this.winVersion = navigator.appVersion;
	
	return this;
}


//get query string from url
window.getQuery = function ( key )
{
	var loc = window.location.search;
	if ( loc == '' ) return null;
	
	var urlvars = loc.split ( "?" );
	query = urlvars[1].split ( "&" );
		
	for ( var i=0; i<query.length; i++ )
	{
		var piece = query[i].split ( "=" );
		if ( key == piece[0] ) return piece[1];
	}
	
	return null;
}


/** include other scripts **/
document.writeln ( '<script type=\'text/javascript\' src=\'scripts/document.js\'></script>' );
document.writeln ( '<script type=\'text/javascript\' src=\'scripts/general.js\'></script>' );
document.writeln ( '<script type=\'text/javascript\' src=\'scripts/ajax.js\'></script>' );	
document.writeln ( '<script type=\'text/javascript\' src=\'scripts/datepicker.js\'></script>' );
