/*
	JS by Chris Milner of Greyspot Web Solutions Ltd, 2009.
	Making of use of JQuery 1.3.2
*/
var _pN;

function GetNewPanel(_panelName) {
	CheckGetQuote();
	_pN=_panelName;
	
	$("#Content").animate({
		opacity: 0
		}, 	500,	LoadContent);
}

function LoadContent()
{                                                     
	window.location.href="index.php?page="+_pN;
	/*
	$("#Content").load(_pN + ".php", "", FadeBackIn); 
	window.location.hash = _pN;
	*/
}

function FadeBackIn() {
	$("#Content").animate({
		opacity: 1
	}, 500);
}

function CheckGetQuote()
{
	if($("#GetQuote").top=210) {
		HideQuote();
	}
}

function GetQuote() {
      $("#GetQuote").animate({ //params array
			opacity: 1, 
			top: "210px"
		}, 
		500,  // duration
		"swing"); // easing
}

function HideQuote() {
      $("#GetQuote").animate({ 
			opacity: 0, 
			top: "-305px"
		},
		500,
		"swing");
}	


    /*
	var currentHash;
	$(document).ready(function(){
		// Initialize history plugin.
		// The callback is called at once by present location.hash.
		if(!window.location.indexOf("?page=")) { 
			alert("page exists");
			if(window.location.hash )
			{
				GetNewPanel(window.location.hash.substring(1));
				currentHash=window.location.hash.substring(1); 
			}
		}
	});
    */