

function isMacIE()
{
	var detect = navigator.userAgent.toLowerCase();
	if ( detect.indexOf( "msie") > 0 && detect.indexOf( "mac_powerpc") > 0)
		return true;
	
	return false;

}
function isIE()
{
	var detect = navigator.userAgent.toLowerCase();
	var OS,browser,version,total,thestring;
	if ( checkIt('msie') ) 
		return true;
	return false;
}


function isSafari()
{
	var detect = navigator.userAgent.toLowerCase();
	var OS,browser,version,total,thestring;
	if ( checkIt('safari') ) 
		return true;

	return false;
}

function checkIt(string)
{
	var detect = navigator.userAgent.toLowerCase();
	var OS,browser,version,total,thestring;
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}



function isLeftPage(pno)
{
	if (pno % 2 == 0 )
		return true;
	return false;
}


function getLastDayForMonth( month, year)
{ 
	switch (month)
	{
		case "1":
			return 31;
		case "2":
			if ((year % 4 == 0) || (year % 100 == 0) || (year % 400 == 0))
				return "29";
			return 28;
		case "3":
			return 31;
		case "4":
			return 30;
		case "5":
			return 31;
		case "6":
			return 30;
		case "7":
			return 31;
		case "8":
			return 31;
		case "9":
			return 30;
		case "10":
			return 31;
		case "11":
			return 30;
		case "12":
			return 31;

		default:
			return -1;
	}
}


function getLastDayForMonthName( month, year)
{ 
	switch (month)
	{
		case "January":
			return 31;
		case "February":
			if ((year % 4 == 0) || (year % 100 == 0) || (year % 400 == 0))
				return "29";
			return 28;
		case "March":
			return 31;
		case "April":
			return 30;
		case "May":
			return 31;
		case "June":
			return 30;
		case "JUly":
			return 31;
		case "August":
			return 31;
		case "September":
			return 30;
		case "October":
			return 31;
		case "November":
			return 30;
		case "December":
			return 31;

		default:
			return -1;
	}
}

