
function reg(){
//alert('hi');
document.reg_form.fname.focus();
}

function chackfrm()
{
     var sfname=document.getElementById('sfname').value;
   //	alert(sfname);
	 var slname=document.getElementById('slname').value;
	 //alert(slname);
      //return false; 
     if (sfname=="" || sfname=="First Name" || sfname==" " )
     {
	   hideAllErrors();
       document.getElementById('fError').style.display ='inline';
       document.getElementById('sfname').focus();
	  
       return false;
      }
	  
	   if(slname=="" || slname=="Last Name" || slname==" ")
     {
	   hideAllErrors();
       document.getElementById('lError').style.display ='inline';
       document.getElementById('slname').focus();
       return false;
      }
 
 }
 
function hideAllErrors() {
document.getElementById("fError").style.display = "none";
document.getElementById("lError").style.display="none";
}
function newImage(arg) {
 if (document.images) {
  rslt = new Image();
  rslt.src = arg;
  return rslt;
 }
}


function basename(path, suffix) {
    var b = path.replace(/^.*[\/\\]/g, '');
    
    if (typeof(suffix) == 'string' && b.substr(b.length-suffix.length) == suffix) {
        b = b.substr(0, b.length-suffix.length);
    }
    
    return b;
}


function str_replace(search, replace, subject) {
 
    var s = subject;
    var ra = r instanceof Array, sa = s instanceof Array;
    var f = [].concat(search);
    var r = [].concat(replace);
    var i = (s = [].concat(s)).length;
    var j = 0;
    
    while (j = 0, i--) {
        if (s[i]) {
            while (s[i] = (s[i]+'').split(f[j]).join(ra ? r[j] || "" : r[0]), ++j in f){};
        }
    }
 
    return sa ? s : s[0];
}

function setlogincookie(obj){
	
	if(basename(obj.src, '')=='remember.gif')
	{
		
		document.getElementById('logincookie').value = 1;
		
		document.getElementById(obj.id).src = str_replace('remember.gif', 'click_remember.gif', obj.src)
	}
	else
	{
				
				document.getElementById('logincookie').value = 0;
				
				document.getElementById(obj.id).src = str_replace('click_remember.gif', 'remember.gif', obj.src)
	}
	
	
}

function DisEvent()
{
	document.getElementById('mkevent').style.display='inline';
}
function HideEvent()
{
	document.getElementById('mkevent').style.display='none';
}


function login_check() {
uname = document.getElementById("uname").value;
pass= document.getElementById("pass").value;

if (uname == "") {
hideAllErrors();
document.getElementById("unameError").style.display = "inline";
document.getElementById("uname").focus();
  return false;
  } 
  if (pass == "") {
hideAllErrors();
document.getElementById("passError").style.display = "inline";

document.getElementById("pass").focus();
  return false;
  } 
     }
function hideAllErrors() {

document.getElementById("unameError").style.display = "none";
document.getElementById("passError").style.display = "none";
}
function mailcheck(mms){
var mails=mms;
if(mails=='other'){
document.getElementById("mml").innerHTML='<select name=mm1><option>coming soon</option></select>'; 
}
else{
document.getElementById("mml").innerHTML=mails; 
}
}

	function group(str)
{  
	    
		
	   
	    if(str=='thisgroup')
		{
	      if(document.getElementById(str).style.display=='none')
			  {
			  			  document.getElementById(str).style.display='block';
			  document.image1.src="/public//images/minus-icon.gif";
			  }
		 else{
		     			
		   document.getElementById(str).style.display='none';
		      document.image1.src="/public//images/plus-sign.gif";
			   
		     }
        }
		
	 if(str=='thisvideo')
		{     if(document.getElementById(str).style.display=='none')
			  {
			  			  document.getElementById(str).style.display='block';
			  document.image2.src="/public//images/minus-icon.gif";
			  }
		 else{
		 
		 document.getElementById(str).style.display='none';
		      document.image2.src="/public//images/plus-sign.gif";	  
		     }
        }	
	if(str=='thiscontact')
		{ 
	      if(document.getElementById(str).style.display=='none')
			  {document.getElementById(str).style.display='block';
			  document.image3.src="/public//images/minus-icon.gif";
			  }
		 else{document.getElementById(str).style.display='none';
		      document.image3.src="/public//images/plus-sign.gif";	  
		     }
        }
	if(str=='thisevent')
		{ 
	      if(document.getElementById(str).style.display=='none')
			  {document.getElementById(str).style.display='block';
			  document.image3.src="/public//images/minus-icon.gif";
			  }
		 else{document.getElementById(str).style.display='none';
		      document.image3.src="/public//images/plus-sign.gif";	  
		     }
        }
	if(str=='thisinbox')
		{ 
	      if(document.getElementById(str).style.display=='none')
			  {document.getElementById(str).style.display='block';
			  document.image4.src="/public//images/minus-icon.gif";
			  }
		 else{document.getElementById(str).style.display='none';
		      document.image4.src="/public//images/plus-sign.gif";	  
		     }
        }		
}



