// JavaScript Document
	var frmTabs = false;
	var tabCnt = 0;
	tab_lt_white = new Image();tab_lt_grey = new Image();
	tab_rt_white = new Image();tab_rt_grey = new Image();
	tab_lt_white.src = "images/tab_left.gif";tab_lt_grey.src = "images/tab_left_grey.gif";
	tab_rt_white.src = "images/tab_right.gif";tab_rt_grey.src = "images/tab_right_grey.gif";

Ajax.Responders.register({
  onCreate: function(request) {
    if (request.options.onlyLatestOfClass && Ajax.currentRequests[request.options.onlyLatestOfClass]) {
            // if a request of this class is already in progress, attempt to abort it before launching this new request
           try { Ajax.currentRequests[request.options.onlyLatestOfClass].transport.abort(); } catch(e) {}
        }
        // keep note of this request object so we can cancel it if superceded
        Ajax.currentRequests[request.options.onlyLatestOfClass] = request;
  },
    onComplete: function(request) {
    if (request.options.onlyLatestOfClass) {
            // remove the request from our cache once completed so it can be garbage collected
             Ajax.currentRequests[request.options.onlyLatestOfClass] = null;
        }
    }
});


	function openTab(tab)
	{

	document.getElementById('output').innerHTML= 'Loding ...';

	if(frmTabs)
		{
			frmTabs.oTab.value = tab;
			for(ii=0;ii<tabCnt;ii++){
				if(document.getElementById('tab'+ii)){
					if (ii == tab){
						document.images ['tabLeft'+ii].src = tab_lt_white.src;
						document.images ['tabRight'+ii].src = tab_rt_white.src;
						document.getElementById('tabTop'+ii).style.backgroundColor = "#ffffff";
						document.getElementById('tabMain'+ii).style.backgroundColor = "#ffffff";
						document.getElementById('tabMain'+ii).style.fontWeight = "bold";
						document.getElementById('tabMain'+ii).style.borderBottom = "";
						document.getElementById('tab'+ii).style.display = "";}
					else{
						document.images ['tabLeft'+ii].src = tab_lt_grey.src;
						document.images ['tabRight'+ii].src = tab_rt_grey.src;
						document.getElementById('tabTop'+ii).style.backgroundColor = "#f2f2f2";
						document.getElementById('tabMain'+ii).style.backgroundColor = "#f2f2f2";
						document.getElementById('tabMain'+ii).style.fontWeight = "normal";
						document.getElementById('tabMain'+ii).style.borderBottom = "1px solid #444444";
						document.getElementById('tab'+ii).style.display = "none";}
				}
			}
		}

		var url = 'includes/jaideehosting.class.php';
		var pars = 'tab='+tab+'';
		
		var myAjax = new Ajax.Updater( 'output', url, { method: 'post', parameters: pars });
/*

	$.ajax({
   	type: "POST",
   	url: "includes/jaideehosting.class.php",
   	data: "tab="+tab,
   	success: function(xml){
	var result = [ $("data", xml).text()];
    $("#output").html(result.join(''));
   }
 });
*/
}

function changePackage(os){
	
	document.getElementById('output_hosting').innerHTML= 'Loding ...';
	var url = 'http://www.jaideehosting.com/en/includes/hostingplanFunction.php';
	var pars = 'os='+os;
	var myAjax = new Ajax.Updater( 'output_hosting', url, { method: 'post', parameters: pars });
	
}



