// JScript source code
strDownloadURL = "test.asp";
var searchFor = "";	
var noInput= "Please include a word or phrase in your search.";
var searchlocale = "";
var isV5 = false;
var isIE = false;
if (parseInt(navigator.appVersion) >= 5) isV5 = true;
if (navigator.appVersion.indexOf("MSIE") != -1) isIE = true;

function MouseOutMenu(Item) {
	if (isV5) {
		var MenuItem = document.getElementById(Item);
		MenuItem.setAttribute("style", "");
	}
	eval(Item + ".style.borderColor = '#E7E7E7';");	
}
function MouseOverMenu(Item) {
	if (isV5) {
		var MenuItem = document.getElementById(Item);
		MenuItem.setAttribute("style", "border-width:2px;border-style:solid;border-color:#000080;");
	}
	eval(Item + ".style.borderColor = '#000080';");
}
function confirmSubmit()
{
	var agree=confirm("Are you sure you want to continue?  Please note that these changes cannot be undone!");
	if (agree)
		return true ;
	else
	return false ;
}

function redirect(){
	window.open("get_order_all.asp")						
}

function openWin( windowURL, windowName, windowFeatures ) { 
	return window.open( windowURL, windowName, windowFeatures ) ; 
} 

function something()
{	
	var agree=confirm("Are you sure you want to continue?  Please note that these changes cannot be undone!");
	if (agree)
		return true ;
	else
	return false ;
}

function newWindow(file,window) {
	msgWindow=open(file,window,'resizable=no,width=400,height=200');
	if (msgWindow.opener == null) msgWindow.opener = self;
}

function downloadToOnlineStorage(strProvider)
{
if(strProvider == "xdrive")
{
	var strXDriveRedirURL = '';
	strXDriveRedirURL += '/onlinestorage/redir_xdrive_download.asp';
	strXDriveRedirURL += ('?' + strDownloadURL);
	window.open(strXDriveRedirURL,'','toolbar=no,menubar=no,scrollbars=no,fullscreen=no,resizable=no,width=575,height=200');
}

}

function change(ID){
		window.location.href = "tax_edit.asp?ID=" + ID
}

function deleterate(ID){
		window.location.href = "tax_delete_confirm.asp?ID=" + ID	
}

function batchdelete() {
		if (window.confirm("Are you sure you want to continue? Deletions cannot be undone!")) 
			{  document.forms[0].Action.value = "Delete";
				document.forms[0].submit();
		} 
    }
    
function CCA(CB)
{
	if (CB.checked)
	{
		hL(CB);
		CB.className = "checkboxchecked";
	}
	else
	{
		dL(CB);
		CB.className = "checkbox";
	}
			
}
function hL(E)
{			
	while (E.tagName!="TR")
		{E=E.parentElement;}				
	E.className = "H";
}
	
function dL(E)
{
	while (E.tagName!="TR")
		{E=E.parentElement;}
	E.className = "";
}
function GetXmlHttpObject(handler)
{ 
	var objXmlHttp=null
	if (navigator.userAgent.indexOf("Opera")>=0)
	{
		alert("This example doesn't work in Opera") 
		return 
	}
	if (navigator.userAgent.indexOf("MSIE")>=0)
	{ 
		var strName="Msxml2.XMLHTTP"
		if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
		{
			strName="Microsoft.XMLHTTP"
		} 
		try
		{ 
			objXmlHttp=new ActiveXObject(strName)
			objXmlHttp.onreadystatechange=handler 
			return objXmlHttp
		} 
		catch(e)
		{ 
			alert("Error. Scripting for ActiveX might be disabled") 
			return 
		} 
	} 
	if (navigator.userAgent.indexOf("Mozilla")>=0)
	{
		objXmlHttp=new XMLHttpRequest()
		objXmlHttp.onload=handler
		objXmlHttp.onerror=handler 
		return objXmlHttp
	}
} 

function Validate(sId,eId)
{
	for(var i=sId;i<eId;i++)
	{
		if(document.getElementById(i).value == '')
		{
			alert(document.getElementById(i).title + ' should not be empty');
			document.getElementById(i).focus();
			return false;
		}
		if(i == eId)
		{
			return true;
		}
	}
}
function Radio_Validate(Obj,message)
{
		var counter;
		counter = 0
		for (var i=0; i < Obj.length; i++)
 		{
			if(Obj[i].checked == false)
				counter = counter + 1
		}
		if(counter == Obj.length)
		{
			alert(message);
			Obj[0].focus()
			return false;
		}
}
function numberOnly(e,txt)
{
	if(e.keyCode == 46)
	{
		var i;
		var dotcount = 0 ;
		for(i=0;i<txt.length;i++)
		{
			if(txt.charAt(i) == ".")
			{
				dotcount = dotcount + 1;
				if(parseInt(dotcount) >= 1)
				{
					e.keyCode = 0;
					alert("Decimal point should not be more then one");
				}
			}
		}
	}
	else if ((!(e.keyCode >= 48 && e.keyCode <= 57)) && (!(e.keyCode == 46 )) && (!(e.keyCode == 13 )))
	{
		e.keyCode = 0;
		//alert(e.keyCode);
		alert("Amount should be in digit 0 to 9");
	}
}
function allowChars(Chars,Obj,Msg)
{
	var checkOK = Chars;
	var checkStr = Obj.value;
	var allValid = true;
	var allNum = "";
	for (i = 0;  i < checkStr.length;  i++)
	{
		ch = checkStr.charAt(i);
		for (j = 0;  j < checkOK.length;  j++)
		if (ch == checkOK.charAt(j))
			break;
		if (j == checkOK.length)
		{
		allValid = false;
		break;
		}
		allNum += ch;
	}
	if (!allValid)
	{
		alert(Msg);
		Obj.focus();
		return false;
	}
	else
		return true;
}
function LimitLength(obj,length,msg)
{
	if(obj.value.length >= length)
	{
		obj.value = obj.value.substring(0,length-1);
		alert(msg);
		obj.focus();
		return false;
	}
}
function reloadCaptcha()
{
	document.getElementById("imgCaptcha").src = "http://www.14gaam.com/aspcaptcha.asp?p=" + new Date().getTime();
}
function Validates(Prefix,sId,eId)
{
	for(var i=sId;i<eId;i++)
	{
		if(document.getElementById(Prefix+i).value == '')
		{
			alert(document.getElementById(Prefix+i).title + ' should not be empty');
			document.getElementById(Prefix+i).focus();
			return false;
		}
		if(i == eId)
		{
			return true;
		}
	}
}
      function drawVisualization() {
        // Create and populate the data table.
        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Name');
        data.addColumn('string', 'Parent');
        data.addColumn('string', 'ToolTip');
        data.addRows(36);
		
        data.setCell(0, 0, 'Lallubhai');
        data.setCell(0, 2, 'Root');
		
        data.setCell(1, 0, 'Chhaganbhai');
        data.setCell(1, 1, 'Lallubhai');
		
        data.setCell(2, 0, 'Ranchhodbhai');
        data.setCell(2, 1, 'Lallubhai');
		
        data.setCell(3, 0, 'Surajben');
        data.setCell(3, 1, 'Chhaganbhai');
		
        data.setCell(4, 0, 'Parbhubhai');
        data.setCell(4, 1, 'Chhaganbhai');
		
        data.setCell(5, 0, 'Jethabhai');
        data.setCell(5, 1, 'Chhaganbhai');
		
		data.setCell(6, 0, 'Punambhai');
        data.setCell(6, 1, 'Chhaganbhai');
		
        data.setCell(7, 0, 'Gautom');
        data.setCell(7, 1, 'Surajben');
		
        data.setCell(8, 0, 'Kusum');
        data.setCell(8, 1, 'Surajben');
		
        data.setCell(9, 0, 'Nitin');
        data.setCell(9, 1, 'Surajben');
		
        data.setCell(10, 0, 'Tarulata');
        data.setCell(10, 1, 'Surajben');
		
        data.setCell(11, 0, 'Harish');
        data.setCell(11, 1, 'Surajben');
		
        data.setCell(12, 0, 'Bhupendra');
        data.setCell(12, 1, 'Surajben');
		
        data.setCell(13, 0, 'Sheetal');
        data.setCell(13, 1, 'Parbhubhai');
		
        data.setCell(14, 0, 'Nital');
        data.setCell(14, 1, 'Parbhubhai');
		
        data.setCell(15, 0, 'Hetal');
        data.setCell(15, 1, 'Parbhubhai');
		
        data.setCell(16, 0, 'Ankita');
        data.setCell(16, 1, 'Parbhubhai');
		
        data.setCell(17, 0, 'Nita');
        data.setCell(17, 1, 'Jethabhai');
		
        data.setCell(18, 0, 'Aarti');
        data.setCell(18, 1, 'Jethabhai');
		
        data.setCell(19, 0, 'Kinnari');
        data.setCell(19, 1, 'Punambhai');
		
        data.setCell(20, 0, 'Vipul');
        data.setCell(20, 1, 'Punambhai');
		
        data.setCell(21, 0, 'Kalpesh');
        data.setCell(21, 1, 'Punambhai');
		
        data.setCell(22, 0, 'Manubhai');
        data.setCell(22, 1, 'Ranchhodbhai');

        data.setCell(23, 0, 'Meena');
        data.setCell(23, 1, 'Manubhai');
		
        data.setCell(24, 0, 'Niranjan');
        data.setCell(24, 1, 'Manubhai');
		
        data.setCell(25, 0, 'Sanjay');
        data.setCell(25, 1, 'Manubhai');

        data.setCell(26, 0, 'Sunil');
        data.setCell(26, 1, 'Manubhai');
		
        data.setCell(27, 0, 'Maniben');
        data.setCell(27, 1, 'Ranchhodbhai');

        data.setCell(28, 0, 'Shantaben');
        data.setCell(28, 1, 'Ranchhodbhai');

        data.setCell(29, 0, 'Alka');
        data.setCell(29, 1, 'Maniben');

        data.setCell(30, 0, 'Swati');
        data.setCell(30, 1, 'Maniben');

        data.setCell(31, 0, 'Anil');
        data.setCell(31, 1, 'Maniben');

        data.setCell(32, 0, 'Sandip');
        data.setCell(32, 1, 'Shantaben');
		
        data.setCell(33, 0, 'Rajal');
        data.setCell(33, 1, 'Shantaben');
		
        data.setCell(34, 0, 'Vedant');
        data.setCell(34, 1, 'Sheetal');
		
        data.setCell(35, 0, 'Manav');
        data.setCell(35, 1, 'Nital');



        // Create and draw the visualization.
        new google.visualization.OrgChart(document.getElementById('visualization')).
            draw(data, {allowHtml: true});
      }

	function jokesOpen(play_Id)
	{
		var url = "http://www.14gaam.com/play-gujarati-jokes-online.asp?Play_Id="+ play_Id;
		window.open(url,"_blank", "height=80,width=350,top=0,left=0,scrollbars=yes,resizable");
	}
	
	function RefreshImage(valImageId) {
		var objImage = document.images[valImageId];
		if (objImage == undefined) {
			return;
		}
		var now = new Date();
		objImage.src = objImage.src.split('?')[0] + '?x=' + now.toUTCString();
	}
	
	function getWidth(objImg)
	{
		getWidth = document.getElementById(objImg).width;
	}
	function getHeight(objImg)
	{
		getHeight = document.getElementById(objImg).height;
	}
