/* javascript functions */
function submitform1(formname)
{
 
  if(CheckValidity())
  {
   formname.submit();
  }

}

function submitform2(formname)
{

  formname.submit();
}


function onEnterpress(e,formname)
{
    //define any varible
    var KeyPress 
		var form1
    //if which property of event object is supported 
    if(e && e.which)
    {
        e = e
        KeyPress = e.which
    }
    else
    {
        e = event
        KeyPress = e.keyCode
    }

    //13 is the key code of enter key
    if(KeyPress == 13)

    {
        //frmLogin is the name of form
		formname.submit()

        return false    
    }

   else

    {

        return true

    }
}

function confirmDeleteArt(url)
			{
				var j=0;
				var el_collection=eval("document.adminForm") ; 
				for (c=0;c<el_collection.length;c++) 
				{	em=el_collection.elements[c]; 
				if(em.checked==true)
				 j++;
				}
				if (j>0)
				{
				  var agree=confirm("您確定要刪除嗎 ?");
					if (agree)
					{
						document.adminForm.submit();
					}
				}
				
			}



			function checkall(formname,checkname){
			var thestate;
			thestate=document.adminForm.v1.checked;
			var el_collection=eval("document.adminForm") ; 
			for (c=0;c<el_collection.length;c++) 
			{	em=el_collection.elements[c]; 
				if(em.type=="checkbox")
				em.checked=thestate
				}
			}