//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      LoginValid      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function LoginValid() {

	if (isWhitespace(document.frmLogin.UserName.value)) 
	{
	     alert("Please enter User Name  ");
	     document.frmLogin.UserName.focus();
	     return false;
	}  

	if (document.frmLogin.UserName.value.length < 4) 
	{
	     alert("The Minimum length for User Name should be 4 !");
	     document.frmLogin.UserName.focus();
	     return false;
	 }

	if (isWhitespace(document.frmLogin.UserPassword.value)) 
	{
	     alert("Please enter  User Password ");
	     document.frmLogin.UserPassword.focus();
	     return false;
	}  
	 if (document.frmLogin.UserPassword.value.length < 4) 
	 {
	     alert("The Minimum length for Password should be 4 !");
	     document.frmLogin.UserPassword.focus();
	     return false;
	 }
	 return true;
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      UserValid      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function UserValid() {

	if (isWhitespace(document.myform.UserName.value)) 
	{
	     alert("Please enter User Name  ");
	     document.myform.UserName.focus();
	     return false;
	}  

	if (document.myform.UserName.value.length < 4) 
	{
	     alert("The Minimum length for User Name should be 4 !");
	     document.myform.UserName.focus();
	     return false;
	 }

	if (isWhitespace(document.myform.UserPassword.value)) 
	{
	     alert("Please enter  User Password ");
	     document.myform.UserPassword.focus();
	     return false;
	}  
	 if (document.myform.UserPassword.value.length < 4) 
	 {
	     alert("The Minimum length for Password should be 4 !");
	     document.myform.UserPassword.focus();
	     return false;
	 }
	if (document.myform.UserEmail.value.length>0){ 
	if (isEmail(document.myform.UserEmail.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.myform.UserEmail.focus();
			return false;
	}  
	}
	 
	 return true;
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~  Valid Departament ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function validedepartamente() {
	
	if (isWhitespace(document.myfrm.DepartamentRo.value)) 
	{
	     alert("Please enter Departament Name!");
	     document.myfrm.DepartamentRo.focus();
	     return false;
	} 
	if (!(isWhitespace(document.myfrm.OrderNo.value)))
	{
	     if (!(isNumber(document.myfrm.OrderNo.value)))
	     {
	       //alert("Te rog introdu numai cifre!");
	       document.myfrm.OrderNo.focus();
	       return false;
	     }
	} 
	
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~  Valid Contact ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function validecontact() {
	
	if (isWhitespace(document.myfrm.ContactDepartament.value)) 
	{
	     alert("Please enter Departament Name!");
	     document.myfrm.ContactDepartament.focus();
	     return false;
	}
	if (isWhitespace(document.myfrm.ContactName.value)) 
	{
	     alert("Please enter Person Name!");
	     document.myfrm.ContactName.focus();
	     return false;
	}
	if (!(isWhitespace(document.myfrm.ContactEMail.value)))
	{
		if (isEmail(document.myfrm.ContactEMail.value)==false) {
			alert("Please enter a valid E-Mail address, like: name@companyname.com ");
			document.myfrm.ContactEMail.focus();
			return false;
		}
	}
	if (!(isWhitespace(document.myfrm.ContactPhone.value)))
	{
	     if (!(isNumberTel(document.myfrm.ContactPhone.value)))
	     {
	       document.myfrm.ContactPhone.focus();
	       return false;
	     }
	}
	if (!(isWhitespace(document.myfrm.ContactMobil.value)))
	{
	     if (!(isNumberTel(document.myfrm.ContactMobil.value)))
	     {
	       document.myfrm.ContactMobil.focus();
	       return false;
	     }
	}
	if (!(isWhitespace(document.myfrm.ContactOrderNo.value)))
	{
	     if (!(isNumber(document.myfrm.ContactOrderNo.value)))
	     {
	       document.myfrm.ContactOrderNo.focus();
	       return false;
	     }
	} 
	
}

// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~ Valid Content Manager ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function validecontent() {
	
	if (isWhitespace(document.myfrm.ContentName.value)) 
	{
	     alert("Please enter Content Name!");
	     document.myfrm.ContentName.focus();
	     return false;
	}
	if (isWhitespace(document.myfrm.ContentCode.value)) 
	{
	     alert("Please enter Content Code!");
	     document.myfrm.ContentCode.focus();
	     return false;
	}
	
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      ValidDirT      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidDirT() {

	if (isWhitespace(document.frmDirT.DirType.value)) 
	{
	     alert("Please enter Type Name ");
	     document.frmDirT.DirType.focus();
	     return false;
	}  
	 return true;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      ValidDirST      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidDirST() {

	if (isWhitespace(document.frmDirST.SubTypeName.value)) 
	{
	     alert("Please enter Type Name ");
	     document.frmDirST.SubTypeName.focus();
	     return false;
	}  
	 return true;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      ValidDirector      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidDirector() {
//	if (isWhitespace(document.myform.UserName.value)) 
//	{
//	     alert("Please enter User Name ");
//	     document.myform.UserName.focus();
//	     return false;
//	}  
//	if (isWhitespace(document.myform.UserPassword.value)) 
//	{
//	     alert("Please enter User Password ");
//	     document.myform.UserPassword.focus();
//	     return false;
//	}  
	if (isWhitespace(document.myform.BodFirstName.value)) 
	{
	     alert("Please enter First Name ");
	     document.myform.BodFirstName.focus();
	     return false;
	} 	
	if (isWhitespace(document.myform.BodLastName.value)) 
	{
	     alert("Please enter Last Name ");
	     document.myform.BodLastName.focus();
	     return false;
	} 	
	 return true;
}

//~~~~~~~      ValidClass      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function ValidClass() {


	 return true;
}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      DocValid      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function DocValid() {
	if (isWhitespace(document.forms[0].xText.value)) 
	{
	     alert("Please enter Document Text");
	     document.forms[0].xText.focus();
	     return false;
	}  
	 return true;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     GlossaryValid      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function GlossaryValid() {
	if (isWhitespace(document.forms[0].xText.value)) 
	{
	     alert("Please enter Glossary Text");
	     document.forms[0].xText.focus();
	     return false;
	}  
	 return true;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     PhonesValid      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function PhonesValid() {
	if (isWhitespace(document.forms[0].PhoneNo.value)) 
	{
	     alert("Please enter Phone No ");
	     document.forms[0].PhoneNo.focus();
	     return false;
	}  
	if (IsPhone(document.forms[0].PhoneNo.value)==false) {
			document.forms[0].PhoneNo.focus();
			return false;
	}
	 return true;
}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~      IsChar      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


var mikExp = /[$\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\`\~\=\|]/;

function IsChar(val) {
var strPass = val.value;
var strLength = strPass.length;
var lchar = val.value.charAt((strLength) - 1);
if(lchar.search(mikExp) != -1) {
var tst = val.value.substring(0, (strLength) - 1);
val.value = tst;
   }
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~   IsChara   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function IsChara(form) {
if(form.value.length < 1) {
alert("Please fill this field; cannot be empty.");
return false;
}
if(form.value.search(mikExp) == -1) {
return true;
}
else {
alert("Sorry, but the following characters\n\r\n\r@ $ % ^ & * # ( ) [ ] \\ { + } ` ~ =  | \n\r\n\rare not allowed!\n");
form.select();
form.focus();
return false;
}
return true;
}



//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~   Valid_Date   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




function Valid_Date(datein){
        
        var indate=datein;
        if (indate.indexOf("-")!=-1){
                var sdate = indate.split("-")
        }
        else {
                var sdate = indate.split("/")
        }
        var chkDate=new Date(Date.parse(indate))
        var cmpDate=(chkDate.getMonth()+1)+"/"+(chkDate.getDate())+"/"+(chkDate.getFullYear())
        var indate2=(Math.abs(sdate[0]))+"/"+(Math.abs(sdate[1]))+"/"+(Math.abs(sdate[2]))

		if ((chkDate.getFullYear() > 3000)||(chkDate.getFullYear() < 1900)) {
                alert("You've entered an invalid year");
				return false;
		}				
		if ((Math.abs(sdate[2]) > 3000)||(Math.abs(sdate[2])< 1900)) {
                alert("You've entered an invalid year");
				return false;
		}				


   if (indate2=="0/NaN/NaN"){
				return true;
   }        
	else {
 		
        if (indate2!=cmpDate){
                alert("You've entered an invalid date or date format.  Please use the MM/DD/YYYY format.");
				return false;
        }
        else {
                if (cmpDate=="NaN/NaN/NaN"){
                        alert("You've entered an invalid date or date format. Please use the MM/DD/YYYY format.");
						return false;
                }
                else {
						return true;
                }       
        }
}        
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     isEmail      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function isEmail(string) {
    if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
        return true;
    else
        return false;
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     IsPhone      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function IsPhone(str)          // is phone str valid
    {
    if (str.length != 12) 
              // nope - wrong str length
		{
		alert('Invalid PhoneNo. Must be 12 digits in the form NNN-NNN-NNNN.');
		return false;
	}		
  for (i=0; i<12; i++)
    {
    if (i == 3 || i == 7)
    {
      if (str.charAt(i) != "-")     // nope - "-" missing
			{
			alert(' Missing - . PhoneNo  must be 12 digits in the form NNN-NNN-NNNN.');
			return false;
			}
	}		
	else
    {
      if (!isNum(str.charAt(i)))
		{
		alert('Non-numeric characters. PhoneNo must be 12 digits in the form NNN-NNN-NNNN.');
		return false;
		}
	}		
  }
  return true;                     

}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     IsFax      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function IsFax(str)          // is Fax str valid
    {
    if (str.length != 12) 
              // nope - wrong str length
		{
		alert('Invalid FaxNo. Must be 12 digits in the form NNN-NNN-NNNN.');
		return false;
	}		
  for (i=0; i<12; i++)
    {
    if (i == 3 || i == 7)
    {
      if (str.charAt(i) != "-")     // nope - "-" missing
			{
			alert(' Missing - . FaxNo  must be 12 digits in the form NNN-NNN-NNNN.');
			return false;
			}
	}		
	else
    {
      if (!isNum(str.charAt(i)))
		{
		alert('Non-numeric characters. FaxNo must be 12 digits in the form NNN-NNN-NNNN.');
		return false;
		}
	}		
  }
  return true;                     

}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     validateZIP      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


function validateZIP(field) {
var valid = "0123456789-";
var hyphencount = 0;

if (field.value.length!=5 && field.value.length!=10) {
alert("Please enter your 5 digit or ( 5 + 4 ) digit  ZIP  code.");
return false;
}
for (var i=0; i < field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (temp == "-") hyphencount++;
if (valid.indexOf(temp) == "-1") {
alert("Invalid characters in your ZIP code.  Please try again.");
return false;
}
if ((hyphencount > 1) || ((field.value.length==10) && ""+field.value.charAt(5)!="-")) {
alert("The hyphen character should be used with a properly formatted 5 digit+four  ZIP  code, like '12345-6789'.   Please try again.");
return false;
   }
}
return true;
}



function isNum(chr)            // is character a number?
  {
  if (chr < "0" || chr > "9")  // nope
    return false;
  else                         // yep
    return true;
  }



function isNumber(InString)  {
        RefString="0123456789";

        for (Count=0; Count < InString.length; Count++)  {
            TempChar= InString.substring (Count, Count+1);
            if (RefString.indexOf (TempChar, 0)==-1) { 
				alert("Please enter numbers only: 0 - 9 ");
				return false;
			}
		}
        return true;
}

function isNumberTel(InString)  {
        RefString="0123456789.()-+";

        for (Count=0; Count < InString.length; Count++)  {
            TempChar= InString.substring (Count, Count+1);
            if (RefString.indexOf (TempChar, 0)==-1) { 
				alert("Please enter a valid number! You can enter only this chars : 0-9 ( ) - +");
				return false;
			}
		}
        return true;
}


function isNumber1(InString)  {
        RefString="0123456789";

        for (Count=0; Count < InString.length; Count++)  {
            TempChar= InString.substring (Count, Count+1);
            if (RefString.indexOf (TempChar, 0)==-1) { 
				alert("Please enter numbers only: 0 - 9 ");
				return false;
			}
		}
        return true;
}



function validateam(field) {
var valid = "123456789:";
var sep = 0;

if (field.value.length <4) {
alert("The GenericTime shall be at least 4 chars long.");
return false;
}
for (var i=0; i < field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (temp == ":") sep++;
if (valid.indexOf(temp) == "-1") {
alert("Invalid characters in your GenericTime.  Please try again.");
return false;
}
if ((sep > 1) || ((field.value.length==5) && ""+field.value.charAt(2)!=":")) {
alert("The ':' character should be used with a properly format, like 7:00.   Please try again.");
return false;
   }
if ((sep > 1) || ((field.value.length==4) && ""+field.value.charAt(1)!=":")) {
alert("The ':' character should be used with a properly format, like 7:00.   Please try again.");
return false;
   }
}
return true;
}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     validateW      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


function validateW(field) {
var valid = "0123456789.";
var hyphencount = 0;


for (var i=0; i < field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);

if (temp == ".") hyphencount++;
	if (valid.indexOf(temp) == "-1") {
	alert("Invalid characters.\n You must type only decimal numbers less than 1.");
	return false;
	}
}
if (field.value >= 1) {
	alert("You must type only decimal numbers less than 1.");
	return false;
}


return true;
}

var reWhitespace = /^\s+$/
// warnEmpty (theField, s)             Notify user that required field theField is empty.


// Notify user that required field theField is empty.
// String s describes expected contents of theField.value.
// Put focus in theField and return false.

function warnEmpty (theField, s)
{   theField.focus()
    alert(mPrefix + s + mSuffix)
    return false
}



// Check whether string s is empty.

function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}



// Returns true if string s is empty or 
// whitespace characters only.

function isWhitespace (s)

{   // Is s empty?
//    return (isEmpty(s));
    return (isEmpty(s) || reWhitespace.test(s));
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~   DelConf   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function DelConf(url)   {
	if (confirm("This Record will be deleted! Are you sure !?"))
		{
		document.forms[0].sCMD.value = "del";
		document.forms[0].action = url;

		document.forms[0].submit();
		}
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goRefresh      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goRefresh(url)   
{

		document.forms[0].sCMD.value = "";
		document.forms[0].action = url;
		document.forms[0].submit();
}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goDel      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goDel(url,ID)   
{
	if (confirm("This Record will be deleted! Are you sure !?"))
		{
		document.forms[0].sCMD.value = "del";
		document.forms[0].ID.value = ID;
		document.forms[0].action = url;
		document.forms[0].submit();
		}
}

function godele(url,xlinkid)   
{
	if (confirm("This Record will be deleted! Are you sure !?"))
		{
		document.forms[0].CID.value = xlinkid;
		document.forms[0].action = url;
		document.forms[0].submit();
		}
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goMod      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goMod(url,ID)   
{
		document.forms[0].sCMD.value = "edit";
		document.forms[0].action = url;
		document.forms[0].ID.value = ID;
		document.forms[0].submit();
}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goAdd      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goAdd(url)   
{

		document.forms[0].sCMD.value = "add";
		document.forms[0].ID.value = "";
		document.forms[0].action = url;
		document.forms[0].submit();
}




//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goSubmi      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goSubmi()
{
		document.forms[0].sCMD.value = "upd";
		document.forms[0].ED.value = "edit";
		document.forms[0].submit( );
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goSubm      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goSubm(xID)
{
		document.forms[0].ID.value = xID;
		document.forms[0].submit( );
}


//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//~~~~~~~     goSort      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

function goSort(url,sSortBy,sSortOrd)
{
//		document.forms[0].sCMD.value = "sort";
		document.forms[0].action = url;
		document.forms[0].SortBy.value  = sSortBy;
		document.forms[0].SortOrd.value = sSortOrd;

		document.forms[0].submit( );
}



