var aPDA = new Array(
	'AvantGo',
	'Windows CE',
	'Blazer',
	'Palm',
	'BlackBerry',
	'SonyEricsson',
	'Smartphone',
	'MMP',
	'Nokia',
	'LG',
	'NetFront',
	'RIM',
	'Xiino',
	'WAP',
	'Samsung',
	'Grand Total'
);

function pda_check(){
	var width = screen.width;
	var height = screen.height;
	if ( width && height){
		if ( width < 640 || width <= height){
			//alert (height);
			pda = 1;
			return true;
			//window.location.href = "include/pda.php?pda=1";
		} 
		else if (width == 640)
		{
				pda = 1;
				return true;
		}
		else {
			//alert(navigator.userAgent);
			
			//window.location.href ="include/pda.php?pda=0&page="+page;
			}
	}
	else{
		if (checkPDABrowser())
		{
				pda = 1;
				return true;
		} 
	}
}


function checkPDABrowser(){
	var s = navigator.userAgent;
	for (var i = 0; i<aPDA.length; i++)
	{
		if (s.search(aPDA[i]) != -1)	
		{
			pda = 1;
			return true;
		}
	}
	pda = 0;
   return false;
}

