function getAjax(){
  var ajax=false; 
  try { 
   ajax = new ActiveXObject("Msxml2.XMLHTTP"); 
  } catch (e) { 
   try { 
    ajax = new ActiveXObject("Microsoft.XMLHTTP"); 
   } catch (E) { 
    ajax = false; 
   } 
  }
  if (!ajax && typeof XMLHttpRequest!='undefined') { 
   ajax = new XMLHttpRequest(); 
      if (ajax.overrideMimeType) 
			 {
       ajax.overrideMimeType('text/xml');
	   }
  } 
  return ajax;
 }
 
 function getBuy(Pages,objID){
  var objdiary = document.getElementById(objID);
  this.serverPage=Pages;
  var ajaxFri = getAjax();   
  ajaxFri.open("GET", this.serverPage, true); 
  ajaxFri.onreadystatechange = function() { 
   if (ajaxFri.readyState == 4 && ajaxFri.status == 200) { 
    var text = ajaxFri.responseText; 
    if(text!=0){
     objdiary.innerHTML=text;
    }
   } 
  } 
    ajaxFri.send(null); 
 }



function changetab(cTab) { 
switch(cTab){
		case 'spec':
			s_change('spec');
			t_change('spec');
		break;
			
		case 'rev':
			s_change('rev');
			t_change('rev');
		break;
			
		case 'sim':
			s_change('sim');
			t_change('sim');
		break;
			
		default: 
			break;
	}

}

	function s_change(tab)
	{
		document.getElementById('tab_spec_data').style.display='none';
		document.getElementById('tab_rev_data').style.display='none';
		document.getElementById('tab_sim_data').style.display='none';	
		document.getElementById('tab_'+tab+'_data').style.display="block";
	}
	function t_change(tab)
	{
		document.getElementById('tab_spec').className="";
		document.getElementById('tab_rev').className="";
		document.getElementById('tab_sim').className="";
	    document.getElementById('tab_'+tab).className="current";
		}
		
		
		var title = window.document.title;
	var description = "";

function bookmarksite(title,url){
		if (window.sidebar) {window.sidebar.addPanel(title, url, "");

		} else if(window.opera && window.print) {var elem = document.createElement('a');elem.setAttribute('href',url);elem.setAttribute('title',title);elem.setAttribute('rel','sidebar');elem.click();

		} else if(document.all) {window.external.AddFavorite(url, title);
		}
	}

	function loadPage(site, pageTitle, pageDescription) {
		var rawURL = window.location.href;
		rawURL = rawURL.replace("#", "");

		if (rawURL.indexOf("SRCCODE=") > 0) {rawURL = rawURL.replace("SRCCODE=", "SRCCODE=WEBDIGG&OLDSRC=");
		} else if (rawURL.indexOf("?") > 0) {rawURL = rawURL + "&SRCCODE=WEBDIGG";
		} else {rawURL = rawURL + "?SRCCODE=WEBDIGG";
		}

		var currentURL = encodeURIComponent(rawURL);
		var title = encodeURIComponent(pageTitle);

		var bodytext = encodeURIComponent(pageDescription);

		var newURL;
		var go = true;

		switch (site) {case "browser":	bookmarksite(pageTitle, rawURL);	
		go = false;break;
		}

		if (go == true) {window.open(newURL, "bookmarkWindow");
		}
	}
function ShowCart()
	{
		window.location="https://www.paypal.com/cgi-bin/webscr?display=1&business=order%40laptop-batteries-shop.com&cmd=_cart";
	//document.getElementById('shopping_cart').submit();
	}
	
	
