function validation()
{
var fname = document.all.fname.value;
var email = document.all.email.value;
var lname = document.all.lname.value;
if(!(fname == ""))
{
if(!(lname == ""))
{
if(!(email == ""))
{

}else
{
alert("Your valid email address is required!");
}
}else
{
alert("Your last name is required!");
}

}else
{
alert("Your first name is required");
}

if (!(fname == "") && !(email == "") && !(lname == "") )
{
document.detailsfr.signup.disabled = false;
}
else
{
document.detailsfr.signup.disabled = true;

} 

}//validation

function ubah(){
document.detailsfr.signup.disabled = false;
}


function validation1()
{
//var pass = document.all.psw.value;
var email = document.all.email.value;

if(!(email == ""))
{
}else
{
alert("Your valid email address is required!");
}


if (!(email == ""))
{
document.all.register.disabled = false;
}
else
{
document.all.register.disabled = true;
} 
}


function ubah1(){
document.all.login.disabled = false;
}

function validation2()
{
var pass = document.all.psw.value;
var email = document.all.email.value;
if(!(email == ""))
{
if(!(pass == ""))
{
}else
{
alert("Enter your Password");
}
}else
{
alert("Email Required!");
}



if (!(pass == "") && !(email == ""))
{
document.all.login.disabled = false;
}
else
{
document.all.login.disabled = true;
} 
}

function validation_general(no)
{
var type,nama,alt,nilai,kembalian,status;
type="";
kembalian = true;

for(var i=0;i < document.forms[no].length;i++)
{
type = document.forms[no].elements[i].type;
nama =document.forms[no].elements[i].nama;
nilai =document.forms[no].elements[i].value;
alt =document.forms[no].elements[i].alt;

if( type == "text" || type == "password" || type == "textarea")
{
if(nilai == "")
{
alert(alt + " Required !");	
kembalian = false;
break ;
}//end nilai
}//end type

//{
//kembalian = false;	
//}

}//end for

return kembalian;

}

function newvalidation(input,form)
{
var arr= input.split(',');
var kem;
for(var i=0;i<arr.length;i++)
{
if(eval("document."+form+"."+arr[i]+".value") == '')
{
eval("var alter=document."+form+"."+arr[i]+".title");
confirm(alter+ " Required !");
kem=false;
break;
}else
{
kem=true;
}//end if

}//end for

return kem;
}//end function



/*
 
Correctly handle PNG transparency in Win IE 5.5 & 6.
http://homepage.ntlworld.com/bobosola. Updated 18-Jan-2006.

Use in <HEAD> with DEFER keyword wrapped in conditional comments:
<!--[if lt IE 7]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->

*/

var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

if ((version >= 5.5) && (document.body.filters)) 
{
   for(var i=0; i<document.images.length; i++)
   {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText 
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>" 
         img.outerHTML = strNewHTML
         i = i-1
      }
   }
}
