function AddCommon(id)
{
   id1 = id.substring(4)+"[]";
   id2 = id.substring(4);
   var oldhtml = document.getElementById(id2+"1[]").innerHTML;
   selBoxObj  = new getObj(id1);
	html = "<select class='reg_input_text' id='"+id2+"1[]' name='"+id2+"1[]' style='width:190px;' size=4 multiple>";
        html += oldhtml;
	for(var i = 0;i<selBoxObj.obj.options.length;i++){
		if(selBoxObj.obj.options[i].selected == true){
                   if(oldhtml.indexOf(selBoxObj.obj.options[i].innerHTML)==-1)
                   {
                    html += "<option value='"+selBoxObj.obj.options[i].value+"'>"+selBoxObj.obj.options[i].innerHTML+"</option>";
                   } 
		}
	}
        html += "</select>";
        document.getElementById(id2+"_add").innerHTML = html;
}
function RemoveCommon(id)
{
   id1 = id.substring(4)+"[]";
   id2 = id.substring(4);
   selBoxObj  = new getObj(id2+'1[]');
	html = "<select class='reg_input_text' id='"+id2+"1[]' name='"+id2+"1[]' style='width:190px;' size=4 multiple>";
	for(var i = 0;i<selBoxObj.obj.options.length;i++){
		if(selBoxObj.obj.options[i].selected == true){
                   // alert(selBoxObj.obj.options[i].value);            
                   // selBoxObj.obj.remove(i);             
                   
		}
                else
                {
                   html += "<option value='"+selBoxObj.obj.options[i].value+"' >"+selBoxObj.obj.options[i].innerHTML+"</option>";             
                }
	}
        html += "</select>";
        document.getElementById(id2+"_add").innerHTML = html;
}
function validate_forgotpassword(){
		var emailTxtBoxObj  = new getObj('email');
		if(!emailCheck(emailTxtBoxObj.obj.value)  || emailTxtBoxObj.obj.value == 'Email ID'  || emailTxtBoxObj.obj.value == ''){
			emailTxtBoxObj.obj.value='';
			emailTxtBoxObj.obj.focus();
			return false;
		}
		return true;
}
function Mask(action)
{
open(action);             
}

function validate_mask(action){
var maskemail = new getObj('maskemail');
var email = new getObj('email');
if(maskemail.obj.value=='')
{
   maskemail.obj.focus();
   alert('Please Enter Emails');
   return false;             
}
else
{
action = action+"|maskemail="+maskemail.obj.value+"|email="+escape(encodeURI(convertplus(email.obj.value)));
open(action);
}

}

function validate_invitation(useremail,username){ 
	var fnameTxtBoxObj  = new getObj('invfname');
	var lnameTxtBoxObj  = new getObj('invlname');
	var emailTxtBoxObj  = new getObj('invemailid');
        var nameExpression = /^[A-Za-z\s]+$/;
	var nameExpressionF = /^[A-Za-z\s\.\/]+$/;
	var criteria = 0;
	var criteriaaction= '';

	if(fnameTxtBoxObj.obj.value != '' && fnameTxtBoxObj.obj.value != 'First Name'){
			//if(fnameTxtBoxObj.obj.value.match(nameExpressionF) == null ){
                        if(fnameTxtBoxObj.obj.value == ''){
				alert('Please enter first name.');
				//fnameTxtBoxObj.obj.value='First Name';
				fnameTxtBoxObj.obj.select();
				return false;
			}else{
				if(!checkLength(fnameTxtBoxObj.obj.value,2,100)){
					alert('First name should be in between 2 and 100 characters.');
					//fnameTxtBoxObj.obj.value='First Name';
					fnameTxtBoxObj.obj.select();
					return false;
				}else{
					criteria = 1;
					criteriaaction = criteriaaction+"|invfname="+escape(encodeURI(convertplus(fnameTxtBoxObj.obj.value)));
				}
			}
	}else{
		alert('Please enter  first name.');
		fnameTxtBoxObj.obj.value='First Name';
		fnameTxtBoxObj.obj.select();
		return false;
	}
	
	
	if(lnameTxtBoxObj.obj.value != '' && lnameTxtBoxObj.obj.value != 'Last Name'){
			//if(!isValidUsernameTxt(srnameTxtBoxObj.obj.value)){
			//if(lnameTxtBoxObj.obj.value.match(nameExpression) == null ){
                        if(lnameTxtBoxObj.obj.value == '' ){
				alert('Please enter last name.');
				//lnameTxtBoxObj.obj.value='Last Name';
				lnameTxtBoxObj.obj.select();
				return false;
			}else{
				if(!checkLength(lnameTxtBoxObj.obj.value,2,50)){
					alert('Last name should be in between 2 and 50  characters.');
					//lnameTxtBoxObj.obj.value='Last Name';
					lnameTxtBoxObj.obj.select();
					return false;
				}else{
					criteria = 1;
					criteriaaction = criteriaaction+"|invlname="+escape(encodeURI(convertplus(lnameTxtBoxObj.obj.value)));
				}
			}
	}else{
		alert('Please enter last name.');
		lnameTxtBoxObj.obj.value='Last Name';
		lnameTxtBoxObj.obj.select();
		return false;
	}
	
	if(!emailCheck(emailTxtBoxObj.obj.value)  || emailTxtBoxObj.obj.value == 'Email ID'  || emailTxtBoxObj.obj.value == ''){
		//emailTxtBoxObj.obj.value='Email ID';
		emailTxtBoxObj.obj.select();
		return false;
	}
	register_invitation(useremail,username);
	
}
function register_invitation(useremail,username){
    loadWaitingImg('load_name_invite');
	url = BASEURL+"invitation/invite";
	parameters = "";
	var fnameTxtBoxObj  = new getObj('invfname');
	var lnameTxtBoxObj  = new getObj('invlname');
	var emailTxtBoxObj  = new getObj('invemailid');
        var emailtextBoxObj  = new getObj('emailtext');
	parameters = "invfname=" + escape(encodeURI(fnameTxtBoxObj.obj.value )) +
                    "&invlname=" + escape(encodeURI( lnameTxtBoxObj.obj.value )) +
                    "&invemailid=" + encodeURI( emailTxtBoxObj.obj.value ) +
                    "&emailtext=" + convertplus(escape(encodeURI( emailtextBoxObj.obj.value ))) +
                    "&useremail=" + encodeURI(useremail) +
                    "&username=" + encodeURI(username);

	xmlHttp_reginv = createRequestObject();
	if (xmlHttp_reginv==null){
		alert ("Can't initaite ajax call.")
		return
	}
	xmlHttp_reginv.onreadystatechange = register_invitationStateChanged;
	xmlHttp_reginv.open('POST', url, true);
	xmlHttp_reginv.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp_reginv.setRequestHeader("Content-length", parameters.length);
	xmlHttp_reginv.setRequestHeader("Connection", "close");
	xmlHttp_reginv.send(parameters);
}
function register_invitationStateChanged(){ 
	if (xmlHttp_reginv.readyState == 4 || xmlHttp_reginv.readyState == "complete"){
		if(xmlHttp_reginv.status ==  200){      
			var s = xmlHttp_reginv.responseText;
                        if(s.indexOf("Session Expired") == -1){  
                        unLoadWaitingImg('load_name_invite');
                        var fnameTxtBoxObj  = new getObj('invfname');
	                var lnameTxtBoxObj  = new getObj('invlname');
	                var emailTxtBoxObj  = new getObj('invemailid');
                        var emailtextBoxObj  = new getObj('emailtext');
                        fnameTxtBoxObj.obj.value = "First Name";
                        lnameTxtBoxObj.obj.value = "Last Name";
                        emailTxtBoxObj.obj.value = "Email ID";
                        emailtextBoxObj.obj.value = "Personalized Text";
			alert(s);
                        }
                        else
                        {
                          alert("Session Expired. You would be redirected to Index page.");
		          window.location = BASEURL+"/index?lg=1";      
                        }
		}else{
			
		}
	}
}
function register_request_invitation(id){
	url = BASEURL+"invitation/inviterequest";
	parameters = "";
	

	parameters = "id=" + encodeURI(id );

	xmlHttp_reginv1 = createRequestObject();
	if (xmlHttp_reginv1==null){
		alert ("Can't initaite ajax call.")
		return
	}
	xmlHttp_reginv1.onreadystatechange = register_request_invitationStateChanged;
	xmlHttp_reginv1.open('POST', url, true);
	xmlHttp_reginv1.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp_reginv1.setRequestHeader("Content-length", parameters.length);
	xmlHttp_reginv1.setRequestHeader("Connection", "close");
	xmlHttp_reginv1.send(parameters);
}
function register_request_invitationStateChanged(){ 
	if (xmlHttp_reginv1.readyState == 4 || xmlHttp_reginv1.readyState == "complete"){
		if(xmlHttp_reginv1.status ==  200){
			var s = xmlHttp_reginv1.responseText;
			var htm = s.split("||");
                        if(s.indexOf("Invitation sent to")!=-1)
                        {
                          document.getElementById("Chr"+htm[1]).innerHTML = "Invite Sent";
                        }
			alert(htm[0]);				
		}else{
			
		}
	}
}
function GetXmlHttpObject() {
	var xmlHttp=null;
	try {
	  	// Firefox, Opera 8.0+, Safari
	  	xmlHttp=new XMLHttpRequest();
	}
	catch (e) {
		// Internet Explorer
	  	try {
	    	xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
	    }
	  	catch (e) {
	    	xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	    }
	}
	return xmlHttp;
}
function rewriteDefValue(name){
	var txtBoxObj  = new getObj(name);
	if(txtBoxObj.obj.value == ''){
		if(name == 'invfname'){
			txtBoxObj.obj.value = 'First Name';
		}else if(name == 'invlname'){
			txtBoxObj.obj.value = 'Last Name';		
		}else if(name == 'invemailid'){
			txtBoxObj.obj.value = 'Email ID';		
		}else if (name == 'srfname'){
			txtBoxObj.obj.value = 'F Name';		
		}else if (name == 'pfname'){
			txtBoxObj.obj.value = 'First Name';		
		}else if (name == 'srplname'){
			txtBoxObj.obj.value = 'Last Name';		
		}else if (name == 'srpfname'){
			txtBoxObj.obj.value = 'First Name';		
		}else if (name == 'srlname'){
			txtBoxObj.obj.value = 'L Name';		
		}else if (name == 'fname'){
			txtBoxObj.obj.value = 'First Name';		
		}else if (name == 'lname'){
			txtBoxObj.obj.value = 'Last Name';		
		}else if (name == 'plname'){
			txtBoxObj.obj.value = 'Last Name';		
		}else if (name == 'porg'){
			txtBoxObj.obj.value = 'Organization';		
		}else if (name == 'dobd'){
			txtBoxObj.obj.value = 'Day';		
		}else if (name == 'doby'){
			txtBoxObj.obj.value = 'Year';		
		}else if (name == 'intgrp'){
			txtBoxObj.obj.value = 'Interest';		
		}else if(name == 'regdate'){
			txtBoxObj.obj.value = 'Days';		
		}else if(name == 'srorg') {
                        txtBoxObj.obj.value = 'Organization';        
                }else if(name == 'emailtext') {
                        txtBoxObj.obj.value = 'Personalized Text';        
                }
                
		txtBoxObj.obj.focus();
		return false;
	} 
	
}
function validate_searchform(action){
	var residentialExpression = /^[A-Za-z0-9\s\,\.\-\:\;\"\(\)]+$/;
        var residentialExpressionO = /^[A-Za-z0-9\s\,\/\.\-\:\;\"\(\)\{\}\'\&\#\_]+$/;
	var nameExpression = /^[A-Za-z\s]+$/;
        var nameExpressionF = /^[A-Za-z\s\/\.]+$/;
	var srnameTxtBoxObj  = new getObj('srfname');
	var srlnameTxtBoxObj  = new getObj('srlname');
	var srorgTxtBoxObj  = new getObj('srorg');
	var intSelBoxObj  = new getObj('interest');
	var productSelBoxObj  = new getObj('prodandserv');	
	var desigSelBoxObj  = new getObj('designation');
	var indSelBoxObj  = new getObj('industry');
	var regdateTxtBoxObj  = new getObj('regdate');	
	
	var criteria = 0;
	var criteriaaction= '';
	var all1criteria = '';
	
	if(srnameTxtBoxObj.obj.value != '' && srnameTxtBoxObj.obj.value != 'F Name'){
				//if(srnameTxtBoxObj.obj.value.match(nameExpressionF) == null ){
                                if(srnameTxtBoxObj.obj.value == ''){
					alert('Please enter first name.');
					srnameTxtBoxObj.obj.value='F Name';
					srnameTxtBoxObj.obj.select();
					return false;
				}else{
					if(!checkLength(srnameTxtBoxObj.obj.value,2,100)){
						alert('First name should be in between 2 and 100  characters.');
						srnameTxtBoxObj.obj.value='F Name';
						srnameTxtBoxObj.obj.select();
						return false;
					}else{
						criteria = 1;
						all1criteria = 1;
						criteriaaction = criteriaaction+"|srfname="+escape(encodeURI(convertplus(srnameTxtBoxObj.obj.value)));
					}
				}
	}

	if(srlnameTxtBoxObj.obj.value != '' && srlnameTxtBoxObj.obj.value != 'L Name'){
				//if(srlnameTxtBoxObj.obj.value.match(nameExpression) == null ){
                                if(srlnameTxtBoxObj.obj.value == '' ){
					alert('Please enter last name.');
					srlnameTxtBoxObj.obj.value='L Name';
					srlnameTxtBoxObj.obj.select();
					return false;
				}else{
					if(!checkLength(srlnameTxtBoxObj.obj.value,2,50)){
						alert('Last name should be in between 2 and 50  characters.');
						srlnameTxtBoxObj.obj.value='L Name';
						srlnameTxtBoxObj.obj.select();
						return false;
					}else{
						criteria = 1;
						all1criteria = 1;
						criteriaaction = criteriaaction+"|srlname="+escape(encodeURI(convertplus(srlnameTxtBoxObj.obj.value)));
					}
				}
	}
	
	if(srorgTxtBoxObj.obj.value != '' && srorgTxtBoxObj.obj.value != 'Organization' ){
		//if(srorgTxtBoxObj.obj.value.match(residentialExpressionO) == null ){
                if(srorgTxtBoxObj.obj.value == '' ){
			alert('Please enter Organization name.');
			srorgTxtBoxObj.obj.value='Organization';
			srorgTxtBoxObj.obj.select();
			return false;
		}else{
                        if(!checkLength(srorgTxtBoxObj.obj.value,3,200)){
						alert('Organization should be in between 3 and 200  characters.');
						//srlnameTxtBoxObj.obj.value='L Name';
						srorgTxtBoxObj.obj.select();
						return false;
                        }else{        
			criteria = 1;
			all1criteria = 1;
			criteriaaction = criteriaaction+"|srorg="+escape(encodeURI(convertplus(srorgTxtBoxObj.obj.value)));
                        }
		}
	}

	if(desigSelBoxObj.obj.options[desigSelBoxObj.obj.selectedIndex].value != '0'){
		criteria = 1;
		all1criteria = 1;
		criteriaaction = criteriaaction+"|designation="+desigSelBoxObj.obj.options[desigSelBoxObj.obj.selectedIndex].value;
	}

	/*if(srintgrpTxtBoxObj.obj.value != '' && srintgrpTxtBoxObj.obj.value != 'Interest' ){
		if(srintgrpTxtBoxObj.obj.value.match(residentialExpression) == null ){
			alert('Please enter alphabetic interests.');
			srintgrpTxtBoxObj.obj.value='Interest';
			srintgrpTxtBoxObj.obj.focus();
			return false;
		}else{
			criteria = 1;
			all1criteria = 1;
			criteriaaction = criteriaaction+"|intgrp="+srorgTxtBoxObj.obj.value;
		}
	}*/
	if(intSelBoxObj.obj.options[intSelBoxObj.obj.selectedIndex].value != '0'){
		criteria = 1;
		all1criteria = 1;
		criteriaaction = criteriaaction+"|interest="+intSelBoxObj.obj.options[intSelBoxObj.obj.selectedIndex].value;
	}
	if(productSelBoxObj.obj.options[productSelBoxObj.obj.selectedIndex].value != '0'){
		criteria = 1;
		all1criteria = 1;
		criteriaaction = criteriaaction+"|prodandserv="+productSelBoxObj.obj.options[productSelBoxObj.obj.selectedIndex].value;
	}
	
	
	
	if(regdateTxtBoxObj.obj.value != '' && regdateTxtBoxObj.obj.value != 'Days' ){
		if(!isNumeric(regdateTxtBoxObj.obj.value)){
			alert('Please enter numeric data.');
			regdateTxtBoxObj.obj.value='Days';
			regdateTxtBoxObj.obj.select();
			return false;
		}else{
			criteria = 1;
			all1criteria = 1;
			criteriaaction = criteriaaction+"|regdate="+regdateTxtBoxObj.obj.value;
		}
	}

	

	if(indSelBoxObj.obj.options[indSelBoxObj.obj.selectedIndex].value != '0'){
		criteria = 1;
		all1criteria = 1;
		criteriaaction = criteriaaction+"|industry="+indSelBoxObj.obj.options[indSelBoxObj.obj.selectedIndex].value;
	}

	if(criteria=='1' && all1criteria == 1){
		action =action + criteriaaction;
		open(action);
                srnameTxtBoxObj.obj.value = 'F Name';
                srlnameTxtBoxObj.obj.value = 'L Name';
                srorgTxtBoxObj.obj.value = 'Organization';
                desigSelBoxObj.obj.selectedIndex = '0';
                productSelBoxObj.obj.selectedIndex = '0';
                intSelBoxObj.obj.selectedIndex = '0';
                indSelBoxObj.obj.selectedIndex = '0';
                regdateTxtBoxObj.obj.value = 'Days';
		return true;
	}else{
		alert("Please enter atleast one search criteria.");
		return false;
	}
	
}
function validate_peerinvitation(action){
	
	var residentialExpression = /^[A-Za-z0-9\s\,\.\-\:\;\'\"\(\)]+$/;
        var residentialExpressionO = /^[A-Za-z0-9\s\,\/\.\-\:\;\(\)]+$/;
	var nameExpression = /^[A-Za-z\s]+$/;
        var nameExpressionF = /^[A-Za-z\s\.\/]+$/;
	var mobilenumericExpression = /^[0-9\s\-\+]+$/;
	var srnameTxtBoxObj  = new getObj('pfname');
	var srlnameTxtBoxObj  = new getObj('plname');
	var srorgTxtBoxObj  = new getObj('porg');
	var pemailTxtBoxObj  = new getObj('pemail');
	var pmobileTxtBoxObj  = new getObj('pmobile');
	
	var criteria = 0;
	var all1criteria = 1;
	var criteriaaction= '';
	if(srnameTxtBoxObj.obj.value != '' && srnameTxtBoxObj.obj.value != 'First Name'){
				//if(srnameTxtBoxObj.obj.value.match(nameExpressionF) == null ){
                                if(srnameTxtBoxObj.obj.value == '' ){
				alert('Please enter first name.');
				srnameTxtBoxObj.obj.value='First Name';
				srnameTxtBoxObj.obj.select();
				return false;
			}else{
				if(!checkLength(srnameTxtBoxObj.obj.value,2,100)){
					alert('First name should be in between 2 and 100 characters.');
					srnameTxtBoxObj.obj.value='First Name';
					srnameTxtBoxObj.obj.select();
					return false;
				}else{
					criteria = 1;
					criteriaaction = "|pfname="+srnameTxtBoxObj.obj.value;
				}
			}
	}else{

		 criteria = 0;
		 all1criteria = 0;
	}
	if(srlnameTxtBoxObj.obj.value != '' && srlnameTxtBoxObj.obj.value != 'Last Name' ){
				//if(srlnameTxtBoxObj.obj.value.match(nameExpression) == null ){
                                if(srlnameTxtBoxObj.obj.value == '' ){
				alert('Please enter last name.');
				srlnameTxtBoxObj.obj.value='Last Name';
				srlnameTxtBoxObj.obj.select();
				return false;
			}else{
				if(!checkLength(srlnameTxtBoxObj.obj.value,2,50)){
					alert('Last name should be in between 2 and 50 characters.');
					srlnameTxtBoxObj.obj.value='Last Name';
					srlnameTxtBoxObj.obj.select();
					return false;
				}else{
					criteria = 1;
					criteriaaction = criteriaaction+"|plname="+srlnameTxtBoxObj.obj.value;
				}
			}
	}else{
		 criteria = 0;
		 all1criteria = 0;
	}
	if(srorgTxtBoxObj.obj.value != '' ){
		//if(srorgTxtBoxObj.obj.value.match(residentialExpressionO) == null ){
                if(srorgTxtBoxObj.obj.value == '' ){
                        /*if(srorgTxtBoxObj.obj.value.indexOf("&") != -1)
                        alert('Please enter And in place of & in Organization name');
                        else*/
			alert('Please enter  Organization name.');
			srorgTxtBoxObj.obj.value='organization';
			srorgTxtBoxObj.obj.select();
			return false;
		}else{
                        if(!checkLength(srorgTxtBoxObj.obj.value,3,200)){
					alert('Organiztion should be in between 3 and 300 characters.');
					srorgTxtBoxObj.obj.value='Organization';
					srorgTxtBoxObj.obj.select();
					return false;
		        }else{        
			criteria = 1;
			criteriaaction = criteriaaction+"|porg="+srorgTxtBoxObj.obj.value;
                        }
		}
	}else{ 
		 criteria = 0;
		 all1criteria = 0;
	}
	
	if(pemailTxtBoxObj.obj.value != '' ){
		if(emailCheck(pemailTxtBoxObj.obj.value) == true){ 
			criteria = 1;
			criteriaaction = criteriaaction+"|pemail="+pemailTxtBoxObj.obj.value;
		}else{
			return false;
		}
	}else{
		 criteria = 0;
		 all1criteria = 0;
	}

	if(pmobileTxtBoxObj.obj.value != '' ){ 
		if(pmobileTxtBoxObj.obj.value.match(mobilenumericExpression) == null ){
				alert('Please enter phone number. E.g. 0091-1234567890 or +91 9820909090 or 982-982-9898');
				pmobileTxtBoxObj.obj.select();
				return false;
		}else{
			criteria = 1;
			criteriaaction = criteriaaction+"|pmobile="+pmobileTxtBoxObj.obj.value;
		}
	}else{
		 criteria = 0;
		 all1criteria = 0;
	}

	if(criteria != 0 && all1criteria != 0){
		action =action + criteriaaction;
		open(action);
		return true;
	}else{
		alert("All fields are Mandatory.");
		return false;
	}

}
function validate_peerform(action){
	var residentialExpression = /^[A-Za-z0-9\s\,\.\-\:\;\"\(\)]+$/;
        var residentialExpressionO = /^[A-Za-z0-9\s\,\/\.\-\:\;\"\(\)]+$/;
	var nameExpression = /^[A-Za-z\s]+$/;
        var nameExpressionF = /^[A-Za-z\s\.\/]+$/;
	var srnameTxtBoxObj  = new getObj('srpfname');
	var srlnameTxtBoxObj  = new getObj('srplname');
	var srorgTxtBoxObj  = new getObj('srorg');
	//var srintgrpTxtBoxObj  = new getObj('city');
	var contrySelBoxObj  = new getObj('country');
	var indSelBoxObj  = new getObj('industry');

	
	var criteria = 0;
	var criteriaaction= '';

	if(srnameTxtBoxObj.obj.value != '' && srnameTxtBoxObj.obj.value != 'First Name'){
				//if(srnameTxtBoxObj.obj.value.match(nameExpressionF) == null){
                                if(srnameTxtBoxObj.obj.value == ''){
				alert('Please enter first name.');
				srnameTxtBoxObj.obj.value='First Name';
				srnameTxtBoxObj.obj.select();
				return false;
			}else{
				if(!checkLength(srnameTxtBoxObj.obj.value,2,100)){
					alert('First name should be in between 2 and 100 characters.');
					srnameTxtBoxObj.obj.value='First Name';
					srnameTxtBoxObj.obj.select();
					return false;
				}else{
					criteria = 1;
					criteriaaction = criteriaaction+"|srpfname="+escape(convertplus(srnameTxtBoxObj.obj.value));
				}
			}
	}
	if(srlnameTxtBoxObj.obj.value != '' && srlnameTxtBoxObj.obj.value != 'Last Name'){
				//if(srlnameTxtBoxObj.obj.value.match(nameExpression) == null){
                                if(srlnameTxtBoxObj.obj.value == ''){
				alert('Please enter last name.');
				srlnameTxtBoxObj.obj.value='Last Name';
				srlnameTxtBoxObj.obj.select();
				return false;
			}else{
				if(!checkLength(srlnameTxtBoxObj.obj.value,2,50)){
					alert('Last name should be in between 2 and 50 characters.');
					srlnameTxtBoxObj.obj.value='Last Name';
					srlnameTxtBoxObj.obj.select();
					return false;
				}else{
					criteria = 1;
					criteriaaction = criteriaaction+"|srplname="+escape(convertplus(srlnameTxtBoxObj.obj.value));
				}
			}
	}
	
	if(srorgTxtBoxObj.obj.value != '' ){
		//if(srorgTxtBoxObj.obj.value.match(residentialExpressionO) == null ){
                if(srorgTxtBoxObj.obj.value == '' ){
			alert('Please enter Organization name.');
			srorgTxtBoxObj.obj.value='Organization';
			srorgTxtBoxObj.obj.focus();
			return false;
		}else{
                        if(!checkLength(srorgTxtBoxObj.obj.value,3,200)){
					alert('Organization should be in between 3 and 200 characters.');
					srorgTxtBoxObj.obj.value='Organization';
					srorgTxtBoxObj.obj.select();
					return false;
		        }else{        
			criteria = 1;
			criteriaaction = criteriaaction+"|srorg="+escape(convertplus(srorgTxtBoxObj.obj.value));
                        }
		}
	}

	if(contrySelBoxObj.obj.options[contrySelBoxObj.obj.selectedIndex].value != '0'){
		criteria = 1;
		criteriaaction = criteriaaction+"|country="+contrySelBoxObj.obj.options[contrySelBoxObj.obj.selectedIndex].value;
	}

	if(indSelBoxObj.obj.options[indSelBoxObj.obj.selectedIndex].value != '0'){
		criteria = 1;
		criteriaaction = criteriaaction+"|srindus="+indSelBoxObj.obj.options[indSelBoxObj.obj.selectedIndex].value;
	}

	if(criteria){
		action =action + criteriaaction;
		open(action);
		return true;
	}else{
		alert("Please enter atleast one search criteria.");
		return false;
	}
	
}
function get_search_result(){
	url = BASEURL+"search/member";
	parameters = "";
	var srfnameTxtBoxObj  = new getObj('srfname');
	var srlnameTxtBoxObj  = new getObj('srlname');
	var srorgBoxObj  = new getObj('srorg');

	parameters = "srfname=" + encodeURI(srfnameTxtBoxObj.obj.value ) +
                    "&srlname=" + encodeURI(srlnameTxtBoxObj.obj.value ) +
                    "&srorg=" + encodeURI( srorgBoxObj.obj.value );

	xmlHttp_srres = createRequestObject();
	if (xmlHttp_srres==null){
		alert ("Can't initaite ajax call.")
		return
	}
	xmlHttp_srres.onreadystatechange = get_search_resultStateChanged;
	xmlHttp_srres.open('POST', url, true);
	xmlHttp_srres.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp_srres.setRequestHeader("Content-length", parameters.length);
	xmlHttp_srres.setRequestHeader("Connection", "close");
	xmlHttp_srres.send(parameters);
}
function get_search_resultStateChanged(){ 
	if (xmlHttp_srres.readyState == 4 || xmlHttp_srres.readyState == "complete"){
		if(xmlHttp_srres.status ==  200){
			var s = xmlHttp_srres.responseText;
		
		}else{
			
		}
	}
}
function isalphabetic(name){
	var txtBoxObj  = new getObj(name);
	var val = txtBoxObj.obj.value;
	var alphabeticExpression = /[A-Za-z]+$/;
	if(val.match(alphabeticExpression) != null){
		alert("correct he");
	}
}
function check_digit(name){
	var txtBoxObj  = new getObj(name);
	var val = txtBoxObj.obj.value;
	var numericExpression = /^[0-9]+$/;
	
	if(val.match(numericExpression) != null){
		if(name =='dobd'){
			if(txtBoxObj.obj.value.length > 2){
				alert('Please enter 2 digit numeric date');
				txtBoxObj.obj.focus();
				return false;
			}
		}
		return true;
	}else{
		if(name =='dobd'){
			txtBoxObj.obj.value = 'Day';
			alert('Please enter numeric date');
		}
		if(name =='doby'){
			txtBoxObj.obj.value = 'Year';
			alert('Please enter numeric year');
		}
		txtBoxObj.obj.focus();
		return false;
	}
	
}
function checkURL(value) {
	var urlregex = new RegExp("^(http:\/\/www.|Http:\/\/www.|https:\/\/www.|Https:\/\/www.|ftp:\/\/www.|www.|http:\/\/|Http:\/\/){1}([0-9A-Za-z]+\.)");
	if(urlregex.test(value)){
		return(true);
	}
return(false);
}
function openOthers(divname){
	var openDiv =  new getObj(divname+"_other");
	
}
function openOtherDiv(divname){ 
	var toggle_hd = new getObj(divname+"_state");

	var toggle_ctrl_str = new getObj(divname+"_ctrl_str");
	var toggle_ctrl_str_other = new getObj(divname+"_ctrl_str_other");
	var toggle_ctrl_str_def = new getObj(divname+"_ctrl_str_def");

	var toggle_load_area = new getObj(divname+"_load_area");
	var toggle_load_area_other = new getObj(divname+"_load_area_other");
	var toggle_load_area_def = new getObj(divname+"_load_area_def");

	if(toggle_hd.obj.value == 'def'){
		toggle_hd.obj.value = 'other';

		toggle_ctrl_str.obj.innerHTML = toggle_ctrl_str_other.obj.innerHTML;
		show(divname+"_load_area_other");
		//toggle_load_area.obj.innerHTML = toggle_load_area_other.obj.innerHTML;
	}else{
		toggle_hd.obj.value = 'def';
		toggle_ctrl_str.obj.innerHTML = toggle_ctrl_str_def.obj.innerHTML;
		hide(divname+"_load_area_other");
		//toggle_load_area.obj.innerHTML = toggle_load_area_def.obj.innerHTML;
	}
}
function validate_reg(){
             
	var alphabeticExpression = /^[A-Za-z]+$/;
        var alphabeticExpressionL = /^[A-Za-z\s]+$/;
        var alphabeticExpressionF = /^[A-Za-z\s\.\/]+$/;
	var othersExpression = /^[A-Za-z0-9\s\,\&\-\/\(\)]+$/;
	var numericExpression = /^[0-9]+$/;
	var mobilenumericExpression = /^[0-9\-\+]+$/;
	var residentialExpression = /^[A-Za-z0-9\s\,\.\-\:\/\[\]\;\"\(\)\{\}\&\_\#\']+$/;


	var txtBoxObj  = new getObj('fname');
	//if(txtBoxObj.obj.value.match(alphabeticExpressionF) == null || txtBoxObj.obj.value == 'First Name'){
        if(txtBoxObj.obj.value == '' || txtBoxObj.obj.value == 'First Name'){
		//txtBoxObj.obj.value = 'First Name';
		alert('Please enter First Name');
		txtBoxObj.obj.select();
		return false;
	}
	
	if(!checkLength(txtBoxObj.obj.value,2,100)){
		//txtBoxObj.obj.value = 'First Name';
		alert('First Name should be between Min 2 and Max 100 Characters');
		txtBoxObj.obj.select();
		return false;
	}

	txtBoxObj  = new getObj('lname');
	//if(txtBoxObj.obj.value.match(alphabeticExpressionL) == null || txtBoxObj.obj.value == 'Last Name'){
        if(txtBoxObj.obj.value == '' || txtBoxObj.obj.value == 'Last Name'){
		//txtBoxObj.obj.value = 'Last Name';
		alert('Please enter Last Name');
		txtBoxObj.obj.select();
		return false;
	}
	if(!checkLength(txtBoxObj.obj.value,2,50)){
		//txtBoxObj.obj.value = 'Last Name';
		alert('Last Name should be between Min 2 and Max 50 Characters');
		txtBoxObj.obj.select();
		return false;
	}
	
	selBoxObj  = new getObj('dobd');
	if(selBoxObj.obj.options[selBoxObj.obj.selectedIndex].value == 0){
		alert('Please select Day of Birth Date.');
		selBoxObj.obj.focus();
		return false;
	}
	selBoxObj  = new getObj('dobm');
	if(selBoxObj.obj.options[selBoxObj.obj.selectedIndex].value == 0){
		alert('Please select Month of Birth Date.');
		selBoxObj.obj.focus();
		return false;
	}
	selBoxObj  = new getObj('doby');
	if(selBoxObj.obj.options[selBoxObj.obj.selectedIndex].value == 0){
		alert('Please select Year of Birth Date.');
		selBoxObj.obj.focus();
		return false;
	}

	selBoxObj  = new getObj('qualification');
	var quali_selectstatus = 0;
	if(selBoxObj.obj.options[selBoxObj.obj.selectedIndex].value != 0){
		if(selBoxObj.obj.options[selBoxObj.obj.selectedIndex].value == 0){
			alert('Please select qualification.');
			selBoxObj.obj.focus();
			return false;
		}else{
			quali_selectstatus = 1;
		}
	}
	hiddenObj = new getObj('qualification_state');
	if(hiddenObj.obj.value == 'other'){		
			otherObj = new getObj('qualification_other');
			//if(otherObj.obj.value.match(othersExpression) == null){
                        if(otherObj.obj.value == ''){
				alert('Please enter comma seperated qualification');
				otherObj.obj.focus();
				return false;
			}else{
					quali_selectstatus = 1;
			}
	}
	/*
		if(quali_selectstatus == 0){
			alert('Please select qualification from combo list or provide other qualification');
			selBoxObj.obj.focus();
			return false;
		}
	*/
	txtBoxObj  = new getObj('nationality');
	//if(txtBoxObj.obj.value.match(alphabeticExpression) == null){
        if(txtBoxObj.obj.value == ''){
			txtBoxObj.obj.value = '';
			alert('Please enter nationality');
			txtBoxObj.obj.focus();
			return false;
	}
        if(!checkLength(txtBoxObj.obj.value,3,50)){
		//txtBoxObj.obj.value = 'Last Name';
		alert('Nationality should be between Min 2 and Max 50 Characters');
		txtBoxObj.obj.select();
		return false;
	}
	
	var emailTxtBoxObj  = new getObj('emailid');
	if(!emailCheck(emailTxtBoxObj.obj.value)){
		alert('Please enter valid email address');
		emailTxtBoxObj.obj.focus();
		return false;
	}

    txtBoxObj  = new getObj('mobile');
    txtBoxObj1  = new getObj('mo1');
    if(txtBoxObj.obj.value!='' || txtBoxObj1.obj.value!=''){
		if(txtBoxObj.obj.value.match(mobilenumericExpression) == null || txtBoxObj1.obj.value.match(mobilenumericExpression) == null){
				alert('Please enter mobile number. E.g. 0091-1234567890 or 91 9820909090 or 982-982-9898. Special Characters are not allowed');
				txtBoxObj.obj.focus();
				return false;
		

		}
    }
	txtBoxObj  = new getObj('officephone');
        txtBoxObj1  = new getObj('oo1');
        txtBoxObj2  = new getObj('oo2');
        
	if(txtBoxObj.obj.value!='' || txtBoxObj1.obj.value!='' || txtBoxObj2.obj.value!=''){
		if(txtBoxObj.obj.value.match(mobilenumericExpression) == null || txtBoxObj1.obj.value.match(mobilenumericExpression) == null || txtBoxObj2.obj.value.match(mobilenumericExpression) == null ){
				alert('Please enter phone number. E.g. 0091-1234567890 or 91 9820909090 or 982-982-9898. Special Characters are not allowed');
				txtBoxObj.obj.focus();
				return false;
		}

	}
	txtBoxObj  = new getObj('resaddr');
	if(txtBoxObj.obj.value!=''){
		//if(txtBoxObj.obj.value.match(residentialExpression) == null){
                if(txtBoxObj.obj.value == ''){
			alert('Please enter Residental address');    
			txtBoxObj.obj.focus();
			return false;
		}
	}
	selBoxObj  = new getObj('curr_ind1[]');
	var selectstatus = 0;
	
		/*if(selBoxObj.obj.options[i].selected == true){
			selectstatus = 1;
		}*/
                if(selBoxObj.obj.options.length > 0)
                {
                   for(var i = 0;i<selBoxObj.obj.options.length;i++){
		   if(selBoxObj.obj.options[i].selected == false){
			selBoxObj.obj.options[i].selected = true;
		     }
                }
                   selectstatus = 1;             
                }
	

	hiddenObj = new getObj('industry_state');
	if(hiddenObj.obj.value == 'other'){		
			otherObj = new getObj('industry_other');
			//if(otherObj.obj.value.match(othersExpression) == null){
                        if(otherObj.obj.value == ''){
				alert('Please provide  comma seperated industry names');
				otherObj.obj.focus();
				return false;
			}else{
				selectstatus = 1;
			}
	}

	if(selectstatus == 0){
		alert('Please select Current Industry.');
		selBoxObj.obj.focus();
		return false;
	}


	txtBoxObj  = new getObj('curr_org');

          
	//if(txtBoxObj.obj.value.match(residentialExpression) == null){
        if(txtBoxObj.obj.value == ''){
               /* if(txtBoxObj.obj.value.indexOf("&") != -1)
                alert('Please enter And in place of & in Organization name');
                else*/
		alert('Please enter Current Organization.');
		txtBoxObj.obj.focus();
		return false;
	}
        
        if(!checkLength(txtBoxObj.obj.value,3,200)){
		//txtBoxObj.obj.value = 'Last Name';
		alert('Organization should be between Min 3 and Max 200 Characters');
		txtBoxObj.obj.select();
		return false;
	}
  
	txtBoxObj  = new getObj('off_addr');	
	if(txtBoxObj.obj.value!='' ){
		//if(txtBoxObj.obj.value.match(residentialExpression) == null){
                if(txtBoxObj.obj.value == ''){
			alert('Please enter Office address');    
			txtBoxObj.obj.focus();
			return false;
		}
	}
   
	selBoxObj  = new getObj('country');
	if(selBoxObj.obj.options[selBoxObj.obj.selectedIndex].value == 0){
		alert('Please select Country.');
		selBoxObj.obj.focus();
		return false;
	}
	
	
	txtBoxObj  = new getObj('comp_site');
	if(txtBoxObj.obj.value!=''){
		        var re5digit = "^www.[a-z0-9/-]+.[a-z0-9/-/.]+$";
			if(txtBoxObj.obj.value.search(re5digit)==-1 || txtBoxObj.obj.value.indexOf(".")==-1 || txtBoxObj.obj.value.indexOf(".")== txtBoxObj.obj.value.lastIndexOf(".")){
			alert('Please enter Company Website.\n e.g. http://www.xyz.com.');
			txtBoxObj.obj.focus();
			return false;
		}
	}
	  

	selBoxObj  = new getObj('designation');
	var desig_selectstatus = 0;
	if(selBoxObj.obj.options[selBoxObj.obj.selectedIndex].value == 0){
		alert('Please select current designation.');
		selBoxObj.obj.focus();
		return false;
	}else{
		desig_selectstatus = 1;
	}
	
	hiddenObj = new getObj('designation_state');
	if(hiddenObj.obj.value == 'other'){		
			otherObj = new getObj('designation_other');
			//if(otherObj.obj.value.match(othersExpression) == null){
                        if(otherObj.obj.value == ''){
				alert('Please enter comma seperated designation');
				otherObj.obj.focus();
				return false;
			}else{
				desig_selectstatus = 1;
			}
	}
	
	if(desig_selectstatus == 0){
		alert('Please select designation from combo list or provide other designation');
		selBoxObj.obj.focus();
		return false;
	}
	selBoxObj  = new getObj('anu_val');
	//if(selBoxObj.obj.selectedIndex != 0){
		if(selBoxObj.obj.options[selBoxObj.obj.selectedIndex].value == 0){
			alert('Please select annual value of procurement.');
			selBoxObj.obj.focus();
			return false;
		}
	//}	
	
	
	selBoxObj  = new getObj('prod_services1[]');
	selectstatus = 0;
	
                if(selBoxObj.obj.options.length > 0)
                {
                   for(var i = 0;i<selBoxObj.obj.options.length;i++){
		     if(selBoxObj.obj.options[i].selected == false){
			selBoxObj.obj.options[i].selected = true;
		}
                   }
                   selectstatus = 1;             
                }
	

//	if(selectstatus == 0){
//		alert('Please select atleast one product & services.');
//		return false;
//	}

	hiddenObj = new getObj('prod_services_state');
	if(hiddenObj.obj.value == 'other'){		
			otherObj = new getObj('prod_services_other');
			//if(otherObj.obj.value.match(othersExpression) == null){
                        if(otherObj.obj.value == ''){
				alert('Please provide comma seperated products and services.');
				otherObj.obj.focus();
				return false;
			}
	}

	
	selBoxObj  = new getObj('prof_int1[]');
	selectstatus = 0;
	
                if(selBoxObj.obj.options.length > 0)
                {
                   for(var i = 0;i<selBoxObj.obj.options.length;i++){
		 if(selBoxObj.obj.options[i].selected == false){
			selBoxObj.obj.options[i].selected = true;
		        }
                   }
                   selectstatus = 1;             
                }
	

//	if(selectstatus == 0){
//		alert('Please select atleast one professional interest.');
//		return false;
//	}

	hiddenObj = new getObj('prof_int_state');
	if(hiddenObj.obj.value == 'other'){		
			otherObj = new getObj('prof_int_other');
			//if(otherObj.obj.value.match(othersExpression) == null){
                        if(otherObj.obj.value == ''){
				alert('Please provide comma seperated Professional Interest.');
				otherObj.obj.focus();
				return false;
			}
	}
	
	/*otherObj = new getObj('sugg_article');
	if(otherObj.obj.value != ''){
		if(otherObj.obj.value.match(residentialExpression) == null){
			alert('Please provide alphabetic comma seperated Suggested article names.');
			otherObj.obj.focus();
			return false;
		}
	}

	otherObj = new getObj('sugg_books');
	if(otherObj.obj.value != ''){
		if(otherObj.obj.value.match(residentialExpression) == null){
			alert('Please provide alphabetic comma seperated Suggested book names.');
			otherObj.obj.focus();
			return false;
		}
	}*/
	
	 var alphabeticphoto = /^[A-Za-z0-9\s\&\-\_\.\(\)]+$/;
	   
	   if(document.getElementById("profileimage").value!='')
	   {
	   var data = document.getElementById("profileimage").value;
	   var arr = data.split(".");
	  
           var agt=navigator.userAgent.toLowerCase();
           
           if(agt.indexOf("msie") != -1)
	   var fin = data.split("\\");
	   else
	   var fin = data.split("/");
	   
	   
	   
           if(fin[fin.length-1].match(alphabeticphoto) == null){
	   alert("File name should contain only &,-,.,_ as special chracters in photo upload");	
	   return false;	
	   }
           
           }
        
	if(document.getElementById('tc').checked == false){
		alert("Sorry, you cannot register till you agree with the Terms & Conditions.");
		return false;
	}

 //return false;
}

flag=3;
goAc = 0;
function open(action){
        
        acn1=action.substring(2);
        if(isNumeric(acn1))
        {
             inter=action;
        }    
        else
        {
           inter="";
        }
        
        
        if(inter!="")
        {
           if(document.getElementById(inter))
           {  
              action=document.getElementById(inter).value;
              flag=1;
              acn=acn1;
           }
           else
           {
              val = readCookie(action);
             /* var hid = document.createElement("input");
              hid.type="hidden";
              hid.id=action;
              hid.name=action;
              hid.value=val;
              document.body.appendChild(hid);*/
              return;  
           }
        }
        else
        {
           
         // if(readCookie("ar"+acn)!=null)
          //{
            flag=0;
          /*}  
          else
          {
            flag=0;
          } */ 
        }
        
        if(goAc==0)
        { 
        if(action == "")
        goAc = 0;
        else
        goAc = 1;
        
	parts = action.split(":");
	temp = parts[0].split("-");
	var type;
	if(temp.length > 1){
		type = temp[0];
		var imgdiv = temp[1];
                if(document.getElementById(imgdiv))
		loadWaitingImg(imgdiv);
	}else{
		type = parts[0];
	}

	if(type == "D"){ 
		openAjax(action);
	}else if(type == 'R'){
		openRedirect();
	}else if(type == 'S'){ 
		
	}

     }       
}


function randnum( min, max ) {
    if( max ) {
        return Math.floor(Math.random() * (max - min + 1)) + min;
    } else {
        return Math.floor(Math.random() * (min + 1));
    }
}
function rand(){
	now = new Date()
	num = (now.getSeconds())*randnum(1,99999);
	num = num+1;
	return num;
}
function openAjax(action){ //alert(action+"asdf");
              
        if(action.indexOf("network/members")==-1)
        pageTimer = 0;        
	parts = action.split(":");
	var temp = rand(); 
	temp = new Ajax_init();
	var myurl = parts[1]; 
	params = parts[2].split("|");
	var str = '';
	for(var i=0;i<params.length;i++){
                
		str = str+params[i]+"&";
	}
	str = str+"aj=1";
        if(flag==0)
        {
        random = Math.floor(Math.random()*9992399);
        url = "ar"+random;
        //document.cookie = url+'='+"D-load_name_postissue:"+parts[1]+":cd=load_name_postissue";
        countCookie('ar122333');
        
       /* if(action.indexOf("|")!=-1)
        {
        var imb = action.split("|");
        
        if(imb[1].indexOf("comment")!=-1)
        {
        action3 = imb[0];
        }
        else if(imb[1].indexOf("postissue")!=-1)
        {
                
        action3 = imb[1];
        }
        else if(imb[1].indexOf("mask")!=-1)
        {
        action3 = imb[1];
        }
        else
        {
        action3 = action;
        }
        }
        else
        {
         action3 = action;       
        } */
       
        //document.cookie = url+'='+action;
        var hid = document.createElement("input");
        hid.type="hidden";
        hid.id=url;
        hid.name=url;
        hid.value=action;
        hid.style.display="none";
        document.body.appendChild(hid);
        }
        else
        {
        url = "ar"+acn;
        }        
         try {
                 YAHOO.util.History.navigate("navbar", url);
              } catch (e) {
                    //alert('12');
                }
             
        // YAHOO.util.Event.preventDefault(evt);
	temp.loadAjax(BASEURL+"/"+myurl,str);
}

var xmlHttp1;
function Ajax_init() {
this.loadAjax = function(myurl,str) { //alert(myurl);
	xmlHttp1 = createRequestObject();
	if (xmlHttp1==null) {
		alert ("Your browser does not support AJAX!");
		return;
	} //alert(str);
	xmlHttp1.onreadystatechange=this.stateChanged;
	xmlHttp1.open('POST', myurl, true);
	xmlHttp1.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	xmlHttp1.setRequestHeader("Content-length",str.length);
	xmlHttp1.setRequestHeader("Connection", "close");
	xmlHttp1.send(str);
}
this.stateChanged = function() { 
	if (xmlHttp1.readyState == 4 || xmlHttp1.readyState == "complete"){
		if(xmlHttp1.status ==  200){
			var s = xmlHttp1.responseText;
			//alert(s+' --- ');
			if(s.indexOf("Session Expired") == -1){
					var temp = s.split(":,:");
					//alert(temp.length+"  length");
                                        
					if(eval(temp.length) == 2){ 
						if(temp[0].indexOf("load_") == 0){
							unLoadWaitingImg(temp[0]);
							
						}else{
                                                        if(document.getElementById(temp[0]))
                                                        {
							document.getElementById(temp[0]).innerHTML =temp[1];
                                                        unLoadWaitingImg(temp[0]);
                                                        }
						}
					}else if(eval(temp.length) == 6){
						document.getElementById(temp[0]).innerHTML =temp[5];
						eval(temp[2])(temp[3],temp[4]);
						if(temp[1].indexOf("load_") == 0){
							unLoadWaitingImg(temp[1]);
						}
					}else if(eval(temp.length) == 5){
                                                if(document.getElementById(temp[0])) {
						document.getElementById(temp[0]).innerHTML =temp[4];
						eval(temp[1])(temp[2],temp[3]);	}					
					}else if(eval(temp.length) == 7){
						//alert(temp[0]+" --- "+temp[3]);
						document.getElementById(temp[0]).innerHTML =temp[4];
						document.getElementById(temp[5]).innerHTML =temp[6];
						eval(temp[1])(temp[2],temp[3]);
					}else if(eval(temp.length) == 4){
						///alert(temp[0]+" --- "+temp[3]);
						document.getElementById(temp[0]).innerHTML =temp[1];
						document.getElementById(temp[2]).innerHTML =temp[3];
					}else if(eval(temp.length) == 3){
						//alert(temp[1].indexOf("load_")+'-----'+temp[1]);
						if(temp[1].indexOf("load_") == 0){
							document.getElementById(temp[0]).innerHTML =temp[2];
							unLoadWaitingImg(temp[1]);
                                                }else if(temp[1].indexOf("loadarg_") == 0){
							eval(temp[1])(temp[2]);
						}else{
							document.getElementById(temp[0]).innerHTML =temp[2];
                                                        if(temp[1] != "")
							eval(temp[1])();
						}
					}else{
						alert(temp[0]);
                                                //alert("hdhhdh");
					}
                                        goAc = 0;
                                        if(temp[1].indexOf("load_name_profile") == 0){
                                                if(document.getElementById("profimg"))
                                                {
                                                document.getElementById("side").innerHTML = '<img src="'+document.getElementById("profimg").src+'" width="130" height="130" id="sideimg">';
                                                document.getElementById("prof").innerHTML = '<img src="'+document.getElementById("profimg").src+'" width="130" height="130" id="profimg">';
                                                }
				         }
			}else{
				alert("Session Expired. You would be redirected to Index page.");
				 window.location = BASEURL+"/index?lg=1";
			}
		}
	}
}
}
function loadarg_articles(str){ //alert(str);
	var temp = str.split(':;;:');
	document.getElementById('arttitle').innerHTML = "<strong>"+temp[0]+"</strong>";
	document.getElementById('artdesc').innerHTML = temp[1];
	document.getElementById('artfullname').innerHTML = temp[2];
	document.getElementById('artdesignation').innerHTML = temp[3];
	document.getElementById('compname').innerHTML = temp[4];
	document.getElementById('dldid').innerHTML = "<a href='/articles/sharedeliver?id="+temp[5]+"'><img src='/img/donload_button.jpg' width='163' height='39' border='0' /></a>";
	document.getElementById('articlecnt').innerHTML = temp[6];
}
function show1(divnm){
        if(document.getElementById(divnm))        
	document.getElementById(divnm).style["display"]="block";
        
}
function hide1(divnm){
        if(document.getElementById(divnm))        
	document.getElementById(divnm).style["display"]="none";
        
}
function show(divnm){
        if(document.getElementById(divnm))        
	document.getElementById(divnm).style["display"]="block";
        if(document.getElementById(divnm))
	document.getElementById(divnm).style["visibility"]="visible";
}
function hide(divnm){
        if(document.getElementById(divnm))        
	document.getElementById(divnm).style["display"]="none";
        if(document.getElementById(divnm))
	document.getElementById(divnm).style["visibility"]="hidden";
}
function change_password(action){
	var criteriaaction = '';
	var curpwdTxtBoxObj  = new getObj('current_password');
	var newpwdTxtBoxObj  = new getObj('new_password');
	var cnfpwdTxtBoxObj  = new getObj('confirm_password');

	var criteria = 0;
	if(!isAlphaNumeric(curpwdTxtBoxObj.obj.value)){
		alert("Please enter alpha numeric current password.");
		curpwdTxtBoxObj.obj.value='';
		curpwdTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = '|cpwd='+curpwdTxtBoxObj.obj.value;
	}
        
       if(newpwdTxtBoxObj.obj.value == '')
       {
                alert("Please Enter new password");
		newpwdTxtBoxObj.obj.value='';
		newpwdTxtBoxObj.obj.focus();
		return false;      
       }

       if(newpwdTxtBoxObj.obj.value.length<6 || newpwdTxtBoxObj.obj.value.length>12){
		alert("Password length should be min. 6 & max. 12 characters");
		newpwdTxtBoxObj.obj.value='';
		newpwdTxtBoxObj.obj.focus();
		return false;
	}
        
        if(!isAlphaNumeric(newpwdTxtBoxObj.obj.value)){
		alert("Please enter alpha numeric new password.");
		newpwdTxtBoxObj.obj.value='';
		newpwdTxtBoxObj.obj.focus();
		return false;
	}

        if(cnfpwdTxtBoxObj.obj.value == '')
        {
                alert("Please Enter confirm new password");
		cnfpwdTxtBoxObj.obj.value='';
		cnfpwdTxtBoxObj.obj.focus();
		return false;   
        }
	
        if(cnfpwdTxtBoxObj.obj.value.length<6 || cnfpwdTxtBoxObj.obj.value.length>12){
		alert("Password length should be min. 6 & max. 12 characters");
		cnfpwdTxtBoxObj.obj.value='';
		cnfpwdTxtBoxObj.obj.focus();
		return false;
	}

	if(!isAlphaNumeric(cnfpwdTxtBoxObj.obj.value)){
		alert("Please enter alpha numeric new confirm password.");
		cnfpwdTxtBoxObj.obj.value='';
		cnfpwdTxtBoxObj.obj.focus();
		return false;
	}

	if(cnfpwdTxtBoxObj.obj.value != newpwdTxtBoxObj.obj.value){
		alert("New password and confirm password doesn't match.");
		cnfpwdTxtBoxObj.obj.value='';
		cnfpwdTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|npwd='+newpwdTxtBoxObj.obj.value+'|cnfpwd='+cnfpwdTxtBoxObj.obj.value;
	}

	if(criteria){
		action =action + criteriaaction;
		open(action);
		return true;
	}else{
		alert("Password cant be changed.");
		return false;
	}
}

function convertplus(val)
{  
   valrj = val;
   var regExp = /\+/g
   if(val.indexOf("+") != -1)
   {          
      valrj = val.replace(regExp,"|-***-|");        
   }
   return valrj;
}

function post_issue(action){
	var criteriaaction = '';
	var issueExpression = /^[A-Za-z0-9\s\,\.\&\?\!\%\(\)]+$/;
	var issueExpressionDesc = /^[A-Za-z0-9\s\,\$\-\+\;\/\"\'\:\.\[\]\{\}\&\?\!\%\(\)]+$/;
        var issueExpressionDe = /^[A-Za-z0-9\s\,\-\;\/\:\.\[\]\{\}\?\%\(\)\$]+$/;            
	var isTitleTxtBoxObj  = new getObj('isstitle');
	var isDescTxtBoxObj  = new getObj('issdesc');
	var sendtoRdBoxObj  = new getObj('sendto');
	var daysSelBoxObj  = new getObj('days');
	var docnameObj  = new getObj('docname');
	var docfiletypeObj  = new getObj('docfiletype');
        var issueExp = /^[\<\>\+]+$/;
	

	var criteria = 0;
       
			/*if(isTitleTxtBoxObj.obj.value.match(issueExpressionDe) == null ){
                                if(isTitleTxtBoxObj.obj.value.indexOf("$")!=-1)
                                alert('Please write USD in place of $');
                                else
				alert('Please enter valid title except using [@,#,$,*,!,:,"",&,+ ] sign.');

				isTitleTxtBoxObj.obj.focus();
				return false;
			}*/ 
                        if(isTitleTxtBoxObj.obj.value == ''){
                          alert('Please Enter issue Title');
                          isTitleTxtBoxObj.obj.focus();
		          return false;
                        } 
                        /*else if(isTitleTxtBoxObj.obj.value.indexOf("<")!=-1 || isTitleTxtBoxObj.obj.value.indexOf(">")!=-1 ){
                             alert('Please enter valid title except using [<,+ ] sign.');
                             isTitleTxtBoxObj.obj.focus();
		             return false;   
                        }*/
                        else{
				criteria = 1;
				criteriaaction = criteriaaction+"|istitle="+escape(encodeURI(convertplus(isTitleTxtBoxObj.obj.value)));
			}
		       
	                
    /*if(isDescTxtBoxObj.obj.value != ''){
		if(isDescTxtBoxObj.obj.value.match(issueExpressionDe) == null ){
                        /*if(isDescTxtBoxObj.obj.value.indexOf("$")!=-1)
                        alert('Please write USD in place of $');
                        else*/
			/*alert('Description should not contain [@,#,*,!,:,"",&,+ ] sign');

			isDescTxtBoxObj.obj.focus();
			return false;
		}else{
			criteria = 1;
			//all1criteria = 1;
			criteriaaction = criteriaaction+"|isdesc="+isDescTxtBoxObj.obj.value;
		}
	} */
                if(isDescTxtBoxObj.obj.value == ''){
		
			alert('Please Enter issue Description');

			isDescTxtBoxObj.obj.focus();
			return false;
		}
               /* else if(isDescTxtBoxObj.obj.value.indexOf("<")!=-1 || isDescTxtBoxObj.obj.value.indexOf("+")!=-1 ){
                             alert('Description should not contain [<,+] sign');
                             isDescTxtBoxObj.obj.focus();
		             return false;   
                }*/
                else{
			criteria = 1;
			//all1criteria = 1;
			criteriaaction = criteriaaction+"|isdesc="+escape(encodeURI(convertplus(isDescTxtBoxObj.obj.value)));
		}
      
	/*if(!isIssue(isDescTxtBoxObj.obj.value)){
		alert("Special characters not allowed in issue description.");
		isDescTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|isdesc='+isDescTxtBoxObj.obj.value;
	}*/
	var chkname='';
	var showtoChkBoxObj;
	var chkcriteria = 0;
	for(var i=1;i<=2;i++){
		chkname = 'showto'+i;
		showtoChkBoxObj  = new getObj(chkname);

		if(document.getElementById(chkname).checked){
			chkcriteria = 1;
			criteriaaction = criteriaaction + '|'+chkname+'='+showtoChkBoxObj.obj.value;
		}
	}
	if(chkcriteria==0){
		alert("Please select atleast one group to view your issue.");
		return false;
	}
        
	//criteriaaction = criteriaaction + '|sendto='+sendtoRdBoxObj.obj.value;
	criteriaaction = criteriaaction + '|days='+daysSelBoxObj.obj.value;
	criteriaaction = criteriaaction + '|docname='+convertplus(escape(encodeURI(docnameObj.obj.innerHTML)));
	criteriaaction = criteriaaction + '|docfiletype='+docfiletypeObj.obj.value;
       

	if(criteria){ 
		action =action + criteriaaction;
		open(action);
		return true;
	}else{
		alert("Please enter all neccessary values for posting issue.");
		return false;
	}
}
function update_issue(action){
	var criteriaaction = '';
	var issueExpression = /^[A-Za-z0-9\s\,\.\&\?\!\%\(\)]+$/;
        var issueExpressionDe = /^[A-Za-z0-9\s\,\-\;\/\:\.\[\]\{\}\?\%\(\)]+$/;      
	var isTitleTxtBoxObj  = new getObj('isstitle');
	var isDescTxtBoxObj  = new getObj('issdesc');
	var sendtoRdBoxObj  = new getObj('sendto');
	var daysSelBoxObj  = new getObj('days');
	var docnameObj  = new getObj('docname');
	var docfiletypeObj  = new getObj('docfiletype');
        
	var docnamedObj = new getObj('dname');
        var docidObj = new getObj('did');
        var issueExp = /^[\<\>\+]+$/;
	var criteria = 0;

         /* if(isTitleTxtBoxObj.obj.value != ''){
		if(isTitleTxtBoxObj.obj.value.match(issueExpressionDe) == null ){
                        if(isTitleTxtBoxObj.obj.value.indexOf("$")!=-1)
                        alert('Please write USD in place of $');
                        else
			alert('Title should not contain [@,#,$,*,!,:,"",&,+] sign.');

			isTitleTxtBoxObj.obj.focus();
			return false;
		}else{
			criteria = 1;
			//all1criteria = 1;
			criteriaaction = criteriaaction+"|istitle="+isTitleTxtBoxObj.obj.value;
		}
	} */
        if(isTitleTxtBoxObj.obj.value == ''){
		        alert('Please Enter issue Title');
			isTitleTxtBoxObj.obj.focus();
			return false;
		}
                /*else if(isTitleTxtBoxObj.obj.value.indexOf("<")!=-1 || isTitleTxtBoxObj.obj.value.indexOf("+")!=-1 ){
                             alert('Title should not contain [<,+] sign.');
                             isTitleTxtBoxObj.obj.focus();
		             return false;   
                }*/else{
			criteria = 1;
			//all1criteria = 1;
			criteriaaction = criteriaaction+"|istitle="+escape(encodeURI(convertplus(isTitleTxtBoxObj.obj.value)));
		}
                
  /*  if(isDescTxtBoxObj.obj.value != ''){
		if(isDescTxtBoxObj.obj.value.match(issueExpressionDe) == null ){
                        if(isDescTxtBoxObj.obj.value.indexOf("$")!=-1)
                        alert('Please write USD in place of $');
                        else
			alert('Description should not contain [@,#,$,*,!,:,"",&,+] sign');

			isDescTxtBoxObj.obj.focus();
			return false;
		}else{
			criteria = 1;
			//all1criteria = 1;
			criteriaaction = criteriaaction+"|isdesc="+isDescTxtBoxObj.obj.value;
		}
	} */
   
        if(isDescTxtBoxObj.obj.value == ''){
		        alert('Please Enter issue Description');
                	isDescTxtBoxObj.obj.focus();
			return false;
		}/*else if(isDescTxtBoxObj.obj.value.indexOf("<")!=-1 || isDescTxtBoxObj.obj.value.indexOf("+")!=-1 ){
                             alert('Description should not contain [<,+] sign');
                             isDescTxtBoxObj.obj.focus();
		             return false;   
                }*/else{
			criteria = 1;
			//all1criteria = 1;
			criteriaaction = criteriaaction+"|isdesc="+escape(encodeURI(convertplus(isDescTxtBoxObj.obj.value)));
		}
                
	var chkname='';
	var showtoChkBoxObj;
	var chkcriteria = 0;
	for(var i=1;i<=2;i++){
		chkname = 'showto'+i;
		showtoChkBoxObj  = new getObj(chkname);

		if(document.getElementById(chkname).checked){
			chkcriteria = 1;
			criteriaaction = criteriaaction + '|'+chkname+'='+showtoChkBoxObj.obj.value;
		}
	}
	if(chkcriteria==0){
		alert("Please select atleast one group to view your issue.");
		return false;
	}

	var docnameObj = new getObj('docname');
        
	if(docnameObj.obj.innerHTML){
		criteria = 1;
		criteriaaction = criteriaaction + '|docname='+convertplus(escape(encodeURI(docnameObj.obj.innerHTML)));
		var docmimetypeObj = new getObj('docfiletype');
		if(docmimetypeObj.obj.value != ''){
			criteriaaction = criteriaaction + '|docfiletype='+escape(encodeURI(docmimetypeObj.obj.value));
		}else{
			criteria = 0;
			alert("It seems there was some problem with file upload. Please Upload document again.");
			return false;
		}
	}

	//criteriaaction = criteriaaction + '|sendto='+sendtoRdBoxObj.obj.value;
	criteriaaction = criteriaaction + '|days='+daysSelBoxObj.obj.value;
        criteriaaction = criteriaaction + '|docnamed='+docnamedObj.obj.value;
        criteriaaction = criteriaaction + '|docid='+docidObj.obj.value;
	//criteriaaction = criteriaaction + '|docname='+docnameObj.obj.value;
	//criteriaaction = criteriaaction + '|docfiletype='+docfiletypeObj.obj.value;
	
	

	if(criteria){
		action =action + criteriaaction;
		open(action);
		return true;
	}else{
		alert("Please enter all neccessary values for posting issue.");
		return false;
	}
}
function update_article(action){
	var criteriaaction = '';
	
	var isTitleTxtBoxObj  = new getObj('arttitle');
	var isDescTxtBoxObj  = new getObj('artdesc');
	var artfullnameTxtBoxObj  = new getObj('artfullname');
	var artdesignationTxtBoxObj  = new getObj('artdesignation');
	var artcompanyTxtBoxObj  = new getObj('artcompany');
	

	var docnameObj  = new getObj('docname');
	var docfiletypeObj  = new getObj('docfiletype');
	var statusSelObj = new getObj('artstatus');
        var docnameObjin  = new getObj('docnamein');
	var docfiletypeObjin  = new getObj('docfiletypein');	

	var criteria = 0;

	if(!isIssue(isTitleTxtBoxObj.obj.value)){
		alert("Special characters not allowed in article title.");
		isTitleTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|arttitle='+isTitleTxtBoxObj.obj.value;
	}

	if(!isIssue(isDescTxtBoxObj.obj.value)){
		alert("Special characters not allowed in article description.");
		isDescTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|artdesc='+isDescTxtBoxObj.obj.value;
	}

	if(!isIssue(artfullnameTxtBoxObj.obj.value)){
		alert("Special characters not allowed in submiters fullname.");
		artfullnameTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|artfullname='+artfullnameTxtBoxObj.obj.value;
	}

	if(!isIssue(artdesignationTxtBoxObj.obj.value)){
		alert("Special characters not allowed in submiters designation.");
		artdesignationTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|artdesignation='+artdesignationTxtBoxObj.obj.value;
	}

	if(!isIssue(artcompanyTxtBoxObj.obj.value)){
                if(artcompanyTxtBoxObj.obj.value.indexOf("&") != -1)
                alert('Please enter And in place of & in submiters company name');
                else
		alert("Special characters not allowed in submiters company name.");
		artcompanyTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|artcompany='+artcompanyTxtBoxObj.obj.value;
	}

	if(docnameObj.obj.innerHTML == 'def'){
		alert("Let Article upload first.");
		document.getElementById('article').focus();
		return false;
	}
        if(docnameObj.obj.innerHTML == '')
        {
	criteriaaction = criteriaaction + '|docname='+escape(encodeURI(docnameObjin.obj.value));
	criteriaaction = criteriaaction + '|docfiletype='+docfiletypeObjin.obj.value;
        }
        else
        {
        criteriaaction = criteriaaction + '|docname='+escape(encodeURI(docnameObj.obj.innerHTML));
	criteriaaction = criteriaaction + '|docfiletype='+docfiletypeObj.obj.value;        
        }
        
	criteriaaction = criteriaaction + '|status='+statusSelObj.obj.value;

	if(criteria){
		action =action + criteriaaction;
		open(action);
		return true;
	}else{
		alert("Please enter all neccessary values for posting article.");
		return false;
	}
}
function post_article(action){
	var criteriaaction = '';
	
	var isTitleTxtBoxObj  = new getObj('arttitle');
	var isDescTxtBoxObj  = new getObj('artdesc');
	var artfullnameTxtBoxObj  = new getObj('artfullname');
	var artdesignationTxtBoxObj  = new getObj('artdesignation');
	var artcompanyTxtBoxObj  = new getObj('artcompany');
	

	var docnameObj  = new getObj('docname');
	var docfiletypeObj  = new getObj('docfiletype');
	var statusSelObj = new getObj('artstatus');

	var criteria = 0;

	if(!isIssue(isTitleTxtBoxObj.obj.value)){
		alert("Special characters not allowed in article title.");
		isTitleTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|arttitle='+isTitleTxtBoxObj.obj.value;
	}

	if(!isIssue(isDescTxtBoxObj.obj.value)){
		alert("Special characters not allowed in article description.");
		isDescTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|artdesc='+isDescTxtBoxObj.obj.value;
	}

	if(!isIssue(artfullnameTxtBoxObj.obj.value)){
		alert("Special characters not allowed in submiters fullname.");
		artfullnameTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|artfullname='+artfullnameTxtBoxObj.obj.value;
	}

	if(!isIssue(artdesignationTxtBoxObj.obj.value)){
		alert("Special characters not allowed in submiters designation.");
		artdesignationTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|artdesignation='+artdesignationTxtBoxObj.obj.value;
	}

	if(!isIssue(artcompanyTxtBoxObj.obj.value)){
                if(artcompanyTxtBoxObj.obj.value.indexOf("&") != -1)
                alert('Please enter And in place of & submiters company name');
                else
		alert("Special characters not allowed in submiters company name.");
		artcompanyTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|artcompany='+artcompanyTxtBoxObj.obj.value;
	}

	if(docnameObj.obj.innerHTML == 'def'){
		alert("Let Article upload first.");
		document.getElementById('article').focus();
		return false;
	}
	criteriaaction = criteriaaction + '|docname='+escape(encodeURI(docnameObj.obj.innerHTML))+'';
	criteriaaction = criteriaaction + '|docfiletype='+docfiletypeObj.obj.value;
	criteriaaction = criteriaaction + '|post=1';
	criteriaaction = criteriaaction + '|status='+statusSelObj.obj.value;

	if(criteria){
		action =action + criteriaaction;
		open(action);
		return true;
	}else{
		alert("Please enter all neccessary values for posting article.");
		return false;
	}
}
function post_blog(action){
	var criteriaaction = '';
	
	var isTitleTxtBoxObj  = new getObj('isstitle');
	var isDescTxtBoxObj  = new getObj('issdesc');
	
	var sendtoRdBoxObj  = new getObj('sendto');
	var daysSelBoxObj  = new getObj('days');

	var criteria = 0;

	if(!isIssue(isTitleTxtBoxObj.obj.value)){
		alert("Special characters not allowed in blog title.");
		isTitleTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|istitle='+isTitleTxtBoxObj.obj.value;
	}

	if(!isIssue(isDescTxtBoxObj.obj.value)){
		alert("Special characters not allowed in blog description.");
		isDescTxtBoxObj.obj.focus();
		return false;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|isdesc='+isDescTxtBoxObj.obj.value;
	}
	var chkname='';
	var showtoChkBoxObj;
	var chkcriteria = 0;
	for(var i=1;i<=4;i++){
		chkname = 'showto'+i;
		showtoChkBoxObj  = new getObj(chkname);

		if(document.getElementById(chkname).checked){
			chkcriteria = 1;
			criteriaaction = criteriaaction + '|'+chkname+'='+showtoChkBoxObj.obj.value;
		}
	}
	if(chkcriteria==0){
		alert("Please select atleast one group to view your blog.");
		return false;
	}

	criteriaaction = criteriaaction + '|sendto='+sendtoRdBoxObj.obj.value;
	criteriaaction = criteriaaction + '|days='+daysSelBoxObj.obj.value;

	if(criteria){
		action =action + criteriaaction;
		open(action);
		return true;
	}else{
		alert("Please enter all neccessary values for posting blog.");
		return false;
	}
}
function reloadLeftNetwork(action,temp){  
	open('D:network/members:nlf=0');
}
function submitCommChange(action){

	var criteriaaction = '';
	var criteria_error = 1;


	var alphabeticExpression = /^[A-Za-z]+$/;
	var numericExpression = /^[0-9\-\+]+$/;
	var residentialExpression = /^[A-Za-z0-9\s\,\.\-\:\\\/\;\'\"\(\)\{\}\&\_\#]+$/;
	var emailTxtBoxObj  = new getObj('emailid');
	    
		txtBoxObj  = new getObj('mobile');
                txtBoxObj1  = new getObj('mo1');
		if(txtBoxObj.obj.value != '' || txtBoxObj1.obj.value != ''){
			if(txtBoxObj.obj.value.match(numericExpression) == null || txtBoxObj.obj.value == '' || txtBoxObj1.obj.value.match(numericExpression) == null ){
					alert('Please enter numeric mobile number. Special Characters are not allowed');
					txtBoxObj.obj.focus();
				//	return false;
				criteria_error = 0;
			}else{
				criteria = 1;
				criteriaaction = criteriaaction + '|mobile='+escape(encodeURI(convertplus(txtBoxObj1.obj.value)))+"@"+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
			}
		}
                else{
				criteria = 1;
				criteriaaction = criteriaaction + '|mobile='+escape(encodeURI(convertplus(txtBoxObj1.obj.value)))+"@"+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
		}
		txtBoxObj  = new getObj('officephone');
                txtBoxObj1  = new getObj('oo1');
                txtBoxObj2  = new getObj('oo2');
		if(txtBoxObj.obj.value != '' || txtBoxObj1.obj.value != '' || txtBoxObj2.obj.value != ''){
			if(txtBoxObj.obj.value.match(numericExpression) == null  || txtBoxObj.obj.value == '' || txtBoxObj1.obj.value.match(numericExpression) == null || txtBoxObj2.obj.value.match(numericExpression) == null){
					alert('Please enter numeric Office Phone Number. Special Characters are not allowed');
					txtBoxObj.obj.focus();
					criteria_error = 0;
			}else{
				criteria = 1;
				criteriaaction = criteriaaction + '|officephone='+escape(encodeURI(convertplus(txtBoxObj1.obj.value)))+"@"+escape(encodeURI(convertplus(txtBoxObj2.obj.value)))+"@"+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
			}
		}
                else{
				criteria = 1;
				criteriaaction = criteriaaction + '|officephone='+escape(encodeURI(convertplus(txtBoxObj1.obj.value)))+"@"+escape(encodeURI(convertplus(txtBoxObj2.obj.value)))+"@"+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
			}

	txtBoxObj  = new getObj('resaddr');
	if(txtBoxObj.obj.value != ''){
			//if(txtBoxObj.obj.value.match(residentialExpression) == null  || txtBoxObj.obj.value == '' ){
                        if( txtBoxObj.obj.value == '' ){
				alert('Please enter Residental address.');
				txtBoxObj.obj.focus();
				criteria_error = 0;
			}else{
				criteria = 1;
				criteriaaction = criteriaaction + '|resaddr='+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
			}
	}
        else{
				criteria = 1;
				criteriaaction = criteriaaction + '|resaddr='+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
			}
	if(criteria_error != 0){
		action =action + criteriaaction;
		open(action);
		//return true;
	}
}
function submitProfChange(action){
	var criteriaaction = '';
	var criteria_error = 1;

	var alphabeticExpression = /^[A-Za-z]+$/;
	var numericExpression = /^[0-9]+$/;
	var residentialExpression = /^[A-Za-z0-9\s\,\.\\\/\-\:\;\'\"\(\)]+$/;
	var residentialExpressionO = /^[A-Za-z0-9\s\,\.\/\-\:\;\'\"\(\)\{\}\#\_\&]+$/;

	selBoxObj  = new getObj('curr_ind1[]');
	selectstatus = 0;
	var curr_ind_ids = '';
	for(var i = 0;i<selBoxObj.obj.options.length;i++){
		/*if(selBoxObj.obj.options[i].selected == true){
			selectstatus = 1;
			curr_ind_ids = curr_ind_ids + selBoxObj.obj.options[i].value +',';
		}*/
                if(selBoxObj.obj.options.length > 0){
			selectstatus = 1;
			curr_ind_ids = curr_ind_ids + selBoxObj.obj.options[i].value +',';
		}
	}

	if(selectstatus == 0){
		alert('Please select Current Industry.');
		selBoxObj.obj.focus();
		criteria_error = 0;
		
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|curr_ind='+escape(encodeURI(curr_ind_ids));
	}
   
	txtBoxObj = new getObj('industry_other');
	if(txtBoxObj.obj.value != ''){
			var othersExpression = /^[A-Za-z0-9\s\,\&\-\/\(\)]+$/;
			//if(txtBoxObj.obj.value.match(othersExpression) == null){
                        if(txtBoxObj.obj.value == ''){
					alert('Please enter Other industries.');
					txtBoxObj.obj.focus();
					criteria_error = 0;
			}else{
					criteria = 1;
					criteriaaction = criteriaaction + '|industry_state=other|industry_other='+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
			}

	}
        else{
					criteria = 1;
					criteriaaction = criteriaaction + '|industry_state=other|industry_other='+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
        }
        
	
	txtBoxObj  = new getObj('curr_org');
	//if(txtBoxObj.obj.value.match(residentialExpressionO) == null  || txtBoxObj.obj.value == '' ){
        if( txtBoxObj.obj.value == '' ){
                        /*if(txtBoxObj.obj.value.indexOf("&") != -1)
                        alert('Please enter And in place of & in Organization name');
                        else*/
			alert('Please enter Current Organization.');
			txtBoxObj.obj.focus();
			criteria_error = 0;
	}
        else if(!checkLength(txtBoxObj.obj.value,3,200)){
		//txtBoxObj.obj.value = 'Last Name';
		alert('Organization should be between Min 3 and Max 200 Characters');
		txtBoxObj.obj.focus();
		criteria_error = 0;
		
	}
        else{
		criteria = 1;
		criteriaaction = criteriaaction + '|curr_org='+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
	}


	txtBoxObj  = new getObj('off_addr');
	if(txtBoxObj.obj.value != ''){
			//if(txtBoxObj.obj.value.match(residentialExpressionO) == null  || txtBoxObj.obj.value == '' ){
                        if( txtBoxObj.obj.value == '' ){
				alert('Please enter Office address.');
				txtBoxObj.obj.focus();
				criteria_error = 0;
			}else{
				criteria = 1;
				criteriaaction = criteriaaction + '|off_addr='+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
			}
	}
        else{
				criteria = 1;
				criteriaaction = criteriaaction + '|off_addr='+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
			}
	txtBoxObj  = new getObj('comp_site');
	if(txtBoxObj.obj.value != ''){
                        var re5digit = "^www.[a-z0-9/-]+.[a-z0-9/-/.]+$";
			if(txtBoxObj.obj.value.search(re5digit)==-1 || txtBoxObj.obj.value.indexOf(".")==-1 || txtBoxObj.obj.value.indexOf(".")== txtBoxObj.obj.value.lastIndexOf(".")){
				alert('Please enter Company Website.\n e.g. www.xyz.com.');
				txtBoxObj.obj.focus();
				criteria_error = 0;
                                
			}else{
				criteria = 1;
				criteriaaction = criteriaaction + '|comp_site='+escape(encodeURI(txtBoxObj.obj.value));
			}
	}
        else{
				criteria = 1;
				criteriaaction = criteriaaction + '|comp_site='+escape(encodeURI(txtBoxObj.obj.value));
			}
	desigSelObj  = new getObj('designation');
	if(desigSelObj.obj.options[desigSelObj.obj.selectedIndex].value == '0' ){
			alert('Please select current designation.');
			desigSelObj.obj.focus();
		//	return false;
		criteria_error = 0;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|designation='+escape(encodeURI(desigSelObj.obj.options[desigSelObj.obj.selectedIndex].value));
	}
    
	txtBoxObj = new getObj('designation_other');
	if(txtBoxObj.obj.value != ''){
			var othersExpression = /^[A-Za-z0-9\s\,\&\-\/\(\)]+$/;
			//if(txtBoxObj.obj.value.match(othersExpression) == null){
                        if(txtBoxObj.obj.value == ''){
			alert('Please enter Other Designation.');
			txtBoxObj.obj.focus();
			criteria_error = 0;
			}else{
			criteria = 1;
			criteriaaction = criteriaaction + '|designation_state=other|designation_other='+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
			}
	}
	countrySelObj  = new getObj('country');
	if(countrySelObj.obj.options[countrySelObj.obj.selectedIndex].value == '0' ){
			alert('Please select current country.');
			countrySelObj.obj.focus();
		//	return false;
		criteria_error = 0;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|country='+escape(encodeURI(countrySelObj.obj.options[countrySelObj.obj.selectedIndex].value));
	}

    annulSelObj  = new getObj('anu_val');
    //if(annulSelObj.obj.options[annulSelObj.obj.selectedIndex].value != '0'){
			if(annulSelObj.obj.options[annulSelObj.obj.selectedIndex].value == '0' ){
					alert('Please select annual turnover.');
					annulSelObj.obj.focus();
				//	return false;
				criteria_error = 0;
			}else{
				criteria = 1;
				criteriaaction = criteriaaction + '|anu_val='+escape(encodeURI(annulSelObj.obj.options[annulSelObj.obj.selectedIndex].value));
			}
                        
	if(criteria_error != 0){
		action =action + criteriaaction;
		open(action);
	}
}
function submitIntChange(action){
	var criteriaaction = '';
	var criteria_error = 1;

	var alphabeticExpression = /^[A-Za-z]+$/;
	var numericExpression = /^[0-9]+$/;
	var residentialExpression = /^[A-Za-z0-9\s\,\.\-\:\;\'\"\(\)]+$/;

	selBoxObj  = new getObj('prod_services1[]');
	var selectstatus = 0;
	var selectedProdService='';
	for(var i = 0;i<selBoxObj.obj.options.length;i++){
		if(selBoxObj.obj.options.length > 0){
			selectstatus = 1;
			selectedProdService = selectedProdService + selBoxObj.obj.options[i].value+',';
		}
                
	}
        
        criteriaaction = criteriaaction + '|prod_services='+escape(encodeURI(selectedProdService));
        
    /*if(selectstatus != 0){
		if(selectstatus == 0){
			alert('Please select products and services.');
			selBoxObj.obj.focus();
			return false;
		}else{
			criteria = 1;
			criteriaaction = criteriaaction + '|prod_services='+escape(encodeURI(selectedProdService));
		}
	}*/
    
	txtBoxObj = new getObj('prod_services_other');
	var othersExpression = /^[A-Za-z0-9\s\,\&\-\/\(\)]+$/;
	if(txtBoxObj.obj.value != ''){
			//if(txtBoxObj.obj.value.match(othersExpression) == null){
                        if(txtBoxObj.obj.value == ''){
				alert('Please enter other Products And Services separated by comma.');
				txtBoxObj.obj.focus();
				criteria_error = 0;
			}else{
				criteria = 1;
				criteriaaction = criteriaaction + '|prod_services_state=other|prod_services_other='+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
			}

	}
        else{
				criteria = 1;
				criteriaaction = criteriaaction + '|prod_services_state=other|prod_services_other='+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
		}
	selBoxObj  = new getObj('prof_int1[]');
	var selectstatus = 0;
	var selectedProfInt='';
	for(var i = 0;i<selBoxObj.obj.options.length;i++){
		if(selBoxObj.obj.options.length > 0){
			selectstatus = 1;
			selectedProfInt = selectedProfInt + selBoxObj.obj.options[i].value+",";
		}
	}
	/* if(selectstatus != 0){
			if(selectstatus == 0){
				alert('Please select professional interest.');
				return false;
			}else{
				criteriaaction = criteriaaction + '|prof_int_state=other|prof_int='+escape(encodeURI(selectedProfInt));
			}
	} */
        criteriaaction = criteriaaction + '|prof_int_state=other|prof_int='+escape(encodeURI(selectedProfInt));
        
	txtBoxObj = new getObj('prof_int_other');
	var othersExpression = /^[A-Za-z0-9\s\,\&\-\/\(\)]+$/;
			if(txtBoxObj.obj.value != ''){
			//if(txtBoxObj.obj.value.match(othersExpression) == null){
                        if(txtBoxObj.obj.value == ''){
				alert('Please enter other professional Interest separated by comma.');
				txtBoxObj.obj.focus();
				criteria_error = 0;
			}else{
				criteria = 1;
				criteriaaction = criteriaaction + '|prof_int_other='+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
			}
	}
        else{
				criteria = 1;
				criteriaaction = criteriaaction + '|prof_int_other='+escape(encodeURI(convertplus(txtBoxObj.obj.value)));
			}
                        
                        
	if(criteria_error != 0){
		action =action + criteriaaction;
		open(action);
	}
}

function submitOtherChange(action){
	var criteriaaction = '';
	var criteria_error = 1;

	var alphabeticExpression = /^[A-Za-z]+$/;
	var numericExpression = /^[0-9]+$/;
	var residentialExpression = /^[A-Za-z0-9\s\,\.\-\:\;\(\)\&\?\[\]\"\/$]+$/;

	/*txtBoxObj  = new getObj('sugg_article');
	if(txtBoxObj.obj.value != ''){
			if(txtBoxObj.obj.value.search(residentialExpression) == -1  ){
				alert('Please enter Suggested Article.');
				txtBoxObj.obj.focus();
				criteria_error = 0;
			}else{
				criteria = 1;
				criteriaaction = criteriaaction + '|sugg_article='+escape(encodeURI(txtBoxObj.obj.value));
			}
	}
        else
        {
                criteria = 1;
		criteriaaction = criteriaaction + '|sugg_article='+escape(encodeURI(txtBoxObj.obj.value));                
        }
	txtBoxObj  = new getObj('sugg_books');
	if(txtBoxObj.obj.value != ''){
			if(txtBoxObj.obj.value.search(residentialExpression) == -1 ){
				alert('Please enter Suggeseted Books.');
				txtBoxObj.obj.focus();
				criteria_error = 0;
			}else{
				criteria = 1;
				criteriaaction = criteriaaction + '|sugg_books='+escape(encodeURI(txtBoxObj.obj.value));
			}
	
	}
        else
        {
                criteria = 1;
		criteriaaction = criteriaaction + '|sugg_books='+escape(encodeURI(txtBoxObj.obj.value));             
        }
	if(criteria_error != 0){
		action =action + criteriaaction;
		open(action);
	}*/
 
	/*txtBoxObj  = new getObj('photofile');
        if(txtBoxObj.obj.value != ''){
	if(txtBoxObj.obj.value.match(residentialExpression) == null  || txtBoxObj.obj.value == '' ){
		alert('Please browse the image.');
		txtBoxObj.obj.focus();
		criteria_error = 0;
        }        
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|photofile='+escape(encodeURI(txtBoxObj.obj.value));
	}*/
	
	
	if(criteria_error != 0){
		action =action + criteriaaction;
		open(action);
	}
}

function loadWaitingImg(divName){
	document.getElementById(divName).innerHTML = "<img src='"+BASEURL+"img/loading.gif' alt='Loading....'>";
	//document.getElementById(divName).src = BASEURL+"img/loading.gif";
}
function unLoadWaitingImg(divName){ 
//		document.getElementById('load_name_cmdt').innerHTML = "";
		var spanArray = document.getElementsByTagName('span');
		for(var i=0;i<spanArray.length;i++){
			if(spanArray[i].id.indexOf("load_") == 0){
				document.getElementById(spanArray[i].id).innerHTML = "";
			}
		}

}
function expand(divname){
	
	var img_name = divname+'_img';
	var temp = document.getElementById(img_name).src.split("/");
	
	var cnt = temp.length;
	if (temp[cnt-1] == "img_minus.gif"){
		
		hide(divname);
		document.getElementById(img_name).src = BASEURL + "img/img_plus.jpg";
	}else{
		
		document.getElementById(img_name).src = BASEURL + "img/img_minus.gif";
		show(divname);	
	}
}
function expand1(divname,s){
	
	var img_name = divname+'_img';
	var temp = document.getElementById(img_name).src.split("/");
	
	var cnt = temp.length;
	if (temp[cnt-1] == "img_minus.gif"){
		
                for(i=1;i<s;i++)
                {                   
		hide1(divname+"_"+i);
                //hide1(i+"_"+divname);  
                }
		document.getElementById(img_name).src = BASEURL + "img/img_plus.jpg";
	}else{
		
		document.getElementById(img_name).src = BASEURL + "img/img_minus.gif";
		for(i=1;i<s;i++)
                {              
		show1(divname+"_"+i);
                //show1(i+"_"+divname);  
                }
	}
}
function check_decline_comment(){

	if(document.decline.declinetype[0].checked == true){
		if(document.getElementById('declinemsg').value == '' || document.getElementById('declinemsg').value == null){
			alert('Please provide reason for declining, else choose NO from the option and proceed');
			document.getElementById('declinemsg').focus();
			return false;
		}else{
			return true;
		}
	}
	return true;
}
function addDiscussIssue(action,slotid){
	var issueIdExpression = /^[0-9]+$/;
	var criteriaaction = '';
	var criteria_error = 1;

	var issueIdTxtBoxObj  = new getObj('slotIsId_'+slotid);

	if(issueIdTxtBoxObj.obj.value.match(issueIdExpression) == null  || issueIdTxtBoxObj.obj.value == '' ){
		alert('Please enter numeric issue id.');
		issueIdTxtBoxObj.obj.focus();
		criteria_error = 0;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|slotIsId_'+slotid+'='+escape(encodeURI(issueIdTxtBoxObj.obj.value));
	}
	
	
	if(criteria_error != 0){
		action =action + criteriaaction;
		open(action);
	}
}
function addDiscussIssueComments(action,slotid){
	var issueIdExpression = /^[0-9,]+$/;
	var criteriaaction = '';
	var criteria_error = 1;

	var issueCommIdTxtBoxObj  = new getObj('slotIsComId_'+slotid);

	if(issueCommIdTxtBoxObj.obj.value.match(issueIdExpression) == null  || issueCommIdTxtBoxObj.obj.value == '' ){
		alert('Please enter numeric issue id.');
		issueCommIdTxtBoxObj.obj.focus();
		criteria_error = 0;
	}else{
		criteria = 1;
		criteriaaction = criteriaaction + '|slotIsComId_'+slotid+'='+escape(encodeURI(issueCommIdTxtBoxObj.obj.value));
	}
	
	//alert(action+criteriaaction);
	if(criteria_error != 0){
		action =action + criteriaaction;
		open(action);
	}
}
function openIssueRespComment(issueId){
	var name = issueId+"_div";
	var name1 = issueId+"_comment";
	closeOtherIssueDesc();
	document.getElementById(name).style["display"] = "block";
	document.getElementById(name).style["visibility"]="visible";
	document.getElementById(name).innerHTML = document.getElementById(name1).innerHTML;
}

function change_profilePref(action){
	var status = '';
	var criteriaaction = '';
	var atleastone = 0;
	var op = 0;
	
     if(document.getElementById("profpref_allmembers").checked == true){
         criteriaaction = criteriaaction + '|profpref_allmembers=1';
		 op = op+1;
		 atleastone = 1;
	 }else{
	     criteriaaction = criteriaaction + '|profpref_allmembers=0';
	 }
	 
	 if(document.getElementById("profpref_mynetwork").checked==true){
		 criteriaaction = criteriaaction + '|profpref_mynetwork=1';
		  op = op+1;
		  atleastone = 1;
	 }else{
	     criteriaaction = criteriaaction + '|profpref_mynetwork=0';
	 }
	 
	 if(document.getElementById("profpref_onlybasicprofile").checked==true){
			criteriaaction = criteriaaction + '|profpref_onlybasicprofile=1';
			 atleastone = 1;
	 }else{
	     criteriaaction = criteriaaction + '|profpref_onlybasicprofile=0';
	 }
         
         if(document.getElementById("profpref_allowpeople").checked==true){
			criteriaaction = criteriaaction + '|profpref_allowpeople=1';
			 atleastone = 1;
	 }else{
	     criteriaaction = criteriaaction + '|profpref_allowpeople=0';
	 }
         
         if(document.getElementById("profpref_dob").checked==true){
			criteriaaction = criteriaaction + '|profpref_dob=1';
			 atleastone = 1;
	 }else{
	     criteriaaction = criteriaaction + '|profpref_dob=0';
	 }
         
         if(document.getElementById("profpref_gender").checked==true){
			criteriaaction = criteriaaction + '|profpref_gender=1';
			 atleastone = 1;
	 }else{
	     criteriaaction = criteriaaction + '|profpref_gender=0';
	 }
	 criteriaaction = criteriaaction + '|porfpref=1';
	 
	if(op == 2){
		alert("Both preferences can not be selected");
		return false;
	}	
	if(op != 1){
		//alert("Only one of 'Who can view my profile' preference should be selected.");
                alert("Alteast one of preference should be selected.");
		return false;
	}

	action =action + criteriaaction;
	open(action);

}

function change_autoMailPref(action){
	var status = '';
	var criteriaaction = '';

     if(document.getElementById("autopref_invitentw").checked == true){
         criteriaaction = criteriaaction + '|autopref_invitentw=1';
	 }else{
	     criteriaaction = criteriaaction + '|autopref_invitentw=0';
	 }
	 if(document.getElementById("autopref_accdecinvitation").checked == true){
         criteriaaction = criteriaaction + '|autopref_accdecinvitation=1';
	 }else{
	     criteriaaction = criteriaaction + '|autopref_accdecinvitation=0';
	 }
	 if(document.getElementById("autopref_accdecntw").checked == true){
         criteriaaction = criteriaaction + '|autopref_accdecntw=1';
	 }else{
	     criteriaaction = criteriaaction + '|autopref_accdecntw=0';
	 }


	 if(document.getElementById("autopref_chgpwd").checked == true){
         criteriaaction = criteriaaction + '|autopref_chgpwd=1';
	 }else{
	     criteriaaction = criteriaaction + '|autopref_chgpwd=0';
	 }
	
	if(document.getElementById("autopref_updprofonlyme").checked == true){
         criteriaaction = criteriaaction + '|autopref_updprofonlyme=1';
	 }else{
	     criteriaaction = criteriaaction + '|autopref_updprofonlyme=0';
	 }
	if(document.getElementById("autopref_updproftontw").checked == true){
         criteriaaction = criteriaaction + '|autopref_updproftontw=1';
	 }else{
	     criteriaaction = criteriaaction + '|autopref_updproftontw=0';
	 }
	 if(document.getElementById("autopref_updprofother").checked == true){
         criteriaaction = criteriaaction + '|autopref_updprofother=1';
	 }else{
	     criteriaaction = criteriaaction + '|autopref_updprofother=0';
	 }
	 if(document.getElementById("autopref_issuepostntw").checked == true){
         criteriaaction = criteriaaction + '|autopref_issuepostntw=1';
	 }else{
	     criteriaaction = criteriaaction + '|autopref_issuepostntw=0';
	 }
	 
//	 if(document.getElementById("autopref_issuepostind").checked == true){
//         criteriaaction = criteriaaction + '|autopref_issuepostind=1';
//	 }else{
//	     criteriaaction = criteriaaction + '|autopref_issuepostind=0';
//	 }
//	 
//	 if(document.getElementById("autopref_issuepostint").checked == true){
//         criteriaaction = criteriaaction + '|autopref_issuepostint=1';
//	 }else{
//	     criteriaaction = criteriaaction + '|autopref_issuepostint=0';
//	 }

	 if(document.getElementById("autopref_issueupdate").checked == true){
         criteriaaction = criteriaaction + '|autopref_issueupdate=1';
	 }else{
	     criteriaaction = criteriaaction + '|autopref_issueupdate=0';
	 }

	 if(document.getElementById("autopref_issueresponse").checked == true){
         criteriaaction = criteriaaction + '|autopref_issueresponse=1';
	 }else{
	     criteriaaction = criteriaaction + '|autopref_issueresponse=0';
	 }

	 if(document.getElementById("autopref_newfeat").checked == true){
         criteriaaction = criteriaaction + '|autopref_newfeat=1';
	 }else{
	     criteriaaction = criteriaaction + '|autopref_newfeat=0';
	 }

//	 if(document.getElementById("autopref_updntwarticle").checked == true){
//         criteriaaction = criteriaaction + '|autopref_updntwarticle=1';
//	 }else{
//	     criteriaaction = criteriaaction + '|autopref_updntwarticle=0';
//	 }
//
//	 if(document.getElementById("autopref_updindarticle").checked == true){
//         criteriaaction = criteriaaction + '|autopref_updindarticle=1';
//	 }else{
//	     criteriaaction = criteriaaction + '|autopref_updindarticle=0';
//	 }
//
//	 if(document.getElementById("autopref_updintareaarticle").checked == true){
//         criteriaaction = criteriaaction + '|autopref_updintareaarticle=1';
//	 }else{
//	     criteriaaction = criteriaaction + '|autopref_updintareaarticle=0';
//	 }

	 if(document.getElementById("autopref_updadminarticle").checked == true){
         criteriaaction = criteriaaction + '|autopref_updadminarticle=1';
	 }else{
	     criteriaaction = criteriaaction + '|autopref_updadminarticle=0';
	 }

	 if(document.getElementById("autopref_removentw").checked == true){
         criteriaaction = criteriaaction + '|autopref_removentw=1';
	 }else{
	     criteriaaction = criteriaaction + '|autopref_removentw=0';
	 }

	


	criteriaaction = criteriaaction + '|porfpref=1';
	 
	 

	action =action + criteriaaction;
	open(action);

}
