﻿// JScript File
function actionToRequest( val )
{
	var txt = document.getElementById("txt_code");
	// alert( val );
	if ( val == txt.value)
	{
		document.getElementById("vars").value= val;
		document.forms[0].submit();
	}
	else
	{
		document.getElementById("vars").value= "-12";
	}
	
}
var counterClick =0;
function errorNumber( count)
{
	//alert(count);
	if( parseInt( count) == -3 )
	{
		hiddeMyElem("txt_code");
        showMyElem("error");
		document.getElementById("error").innerHTML="קוד שגוי";
	}
}
function countLinesShow( count)
{
	//alert(count);
	if( parseInt( count) == 0 )
	{
	    hiddeMyElem("txt_code");
		showMyElem("error");//("error");
		
	}
}
function checkLines()
{
	getdata("?lines=003");
}
function tocheck()
{
	counterClick++;
	var txt = document.getElementById("txt_code");
	if( txt.value =="")
	 {
	 	alert("הקלד את הקוד");
		return ;		
	 }
	 //alert(txt.value);
	 getdata("?varch=" + txt.value);
	 
} 

function checkSubmit()
{
  if (document.getElementById("vars").value == "-12" || document.getElementById("vars").value == "") {
  	return false;
  }
   return true;
}
