function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
} 
	function goLeft()
	{
		
		var max_left = 5
		
		
		document.getElementById('right_arrow').style.opacity=1;
		document.getElementById('right_arrow').style.filter="alpha(opacity = 100)";


		document.getElementById('scroll_box').scrollLeft=document.getElementById('scroll_box').scrollLeft-4;
		
		if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
		max_left = 750-document.getElementById('scroll_box').scrollWidth+5; }

		if (document.getElementById('scroll_box').scrollLeft <= max_left) 
		{
		document.getElementById('left_arrow').style.opacity=0.5;
		document.getElementById('left_arrow').style.filter="alpha(opacity = 30)";
		}
		
	}
	
		function goLeft2()
	{
		var max_left = document.getElementById('scroll_box').scrollWidth - 750

		document.getElementById('right_arrow').style.opacity=1;
		document.getElementById('right_arrow').style.filter="alpha(opacity = 100)";

		
		document.getElementById('scroll_box').scrollLeft=document.getElementById('scroll_box').scrollLeft+4;
		if (document.getElementById('scroll_box').scrollLeft >= max_left) 
		{
		document.getElementById('left_arrow').style.opacity=0.5;
		document.getElementById('left_arrow').style.filter="alpha(opacity = 30)";
		}
			
	}

	function goRight()
	{
		
		var max_right = document.getElementById('scroll_box').scrollWidth - 750
		 
		document.getElementById('left_arrow').style.opacity=1;
		document.getElementById('left_arrow').style.filter="alpha(opacity = 100)";


		document.getElementById('scroll_box').scrollLeft=document.getElementById('scroll_box').scrollLeft+4;

		
		if (/Firefox[\/\s](\d+\.\d+)/.test(navigator.userAgent)){ //test for Firefox/x.x or Firefox x.x (ignoring remaining digits);
		max_right = 0; }


		if (document.getElementById('scroll_box').scrollLeft >= max_right) 
		{
		document.getElementById('right_arrow').style.opacity=0.5;//
		document.getElementById('right_arrow').style.filter="alpha(opacity = 30)";
		}
		
	}

	function goRight2()
	{
		var max_right = 5
		 
		document.getElementById('left_arrow').style.opacity=1;
		document.getElementById('left_arrow').style.filter="alpha(opacity = 100)";

		
		document.getElementById('scroll_box').scrollLeft=document.getElementById('scroll_box').scrollLeft-4;
		if (document.getElementById('scroll_box').scrollLeft <= max_right) 
		{
		document.getElementById('right_arrow').style.opacity=0.5;//
		document.getElementById('right_arrow').style.filter="alpha(opacity = 30)";
		}
		
	}

function getScrollPos()
{
	var str= document.location;
	var str2 =str.substr(10);
	return 'str2';

}
function RunURL(url)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request");
		return ;
	} 


	if (xmlHttp) 
	{
		xmlHttp.open('POST', url, false);
		xmlHttp.send(null);
		return xmlHttp.responseText;
	} 
	else 
	{
		return "Error - Please try again";
	}

} 

function sureOp(url) 
    {
	confirmObj=confirm("Do you really want to delete ?");
	if (confirmObj)
	{
		document.location.href=url;
	}
	return false;
     }


function IsNumeric(sText)
{
   var ValidChars = "0123456789.-";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
   }
function checkMail(mail)
{
	var x = mail;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	return (filter.test(x)) 
}

