/**************************************************************
 * Created on January 2, 2010
 *
 *  Blabbers Communications Confidential
 *
 *  Source Materials.
 *
 *
 *  (C) Copyright Blabbers Communications Ltd. 2010
 *
 *  The source code for this program is not published or otherwise
 *  divested of its trade secrets, irrespective of what has been
 *  deposited with the U.S. Copyright Office.
 *
 *  Author: Blabbers Communications Ltd.
 **************************************************************/

var pageTracker = null;

function initGAT(){
		//alert("initGAT ");
		//for gilad.dyndns.info
		//pageTracker = _gat._getTracker("UA-12676876-1");
		
		//for www.blabbers.com
              if(_gat!=null) pageTracker = _gat._getTracker("UA-12664087-1");
}

function sendGAT(pageName) {
	//alert("sendGAT " + pageName);
       if(pageTracker==null) initGAT();	
   	if (pageTracker!=null) pageTracker._trackPageview(pageName); 
	
}

function sendGATEvent(category, action, optional_label, optional_value){
	//alert("sendGAT "+category+","+ action+", "+optional_label+", "+optional_value);
	if(pageTracker==null) initGAT();
	if (pageTracker!=null) {
		//alert("initGAT ok");
		try {
			pageTracker._trackPageview("portal"); 
			pageTracker._trackEvent(category, action, optional_label, parseInt("" + optional_value));
		} catch (err) { }
		//alert("sendGATEvent ok");
	}		

}

