/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
var GScript = new Object();
GScript.loadGPage = function(pageId){
    GScript.startLoad();
    var ajaxIndex = ajaxObjects.length;
    ajaxObjects[ajaxIndex] = new sack();

    ajaxObjects[ajaxIndex].requestFile = '?id=' + pageId + '&ajax=true';	// Specifying which file to get
    //alert(ajaxObjects[ajaxIndex].requestFile);
    ajaxObjects[ajaxIndex].onCompletion = function(){ GScript.handelGPage(ajaxIndex); };	// Specify function that will be executed after file has been found
    ajaxObjects[ajaxIndex].runAJAX();		// Execute AJAX function
    return false;
}
GScript.handelGPage = function(ajaxIndex){
        GScript.endLoad();
		var doc = ajaxObjects[ajaxIndex].response;
		document.getElementById('main').innerHTML = doc;
}
GScript.startLoad = function(){
    
}
GScript.endLoad = function(){

}
        