var arrShowId=new Array();
var count=0;
var tempObj;


function check(value)
{
 //alert(value)
	//if(value !=10)
 // document.getElementById("comp_keywords").style.visibility="visible";
  }

function changeUser(obj, divId){
	if(obj!=''){
		val=obj.value;			
	}else{
		val=document.getElementById(divId).value;
	}	
	form_companyObj=document.getElementById('form_company');
	switch(val){
		case 'vendor':
			form_companyObj.className='visibleObj';			
			break;
		case 'retailer':
			form_companyObj.className='hiddenObj';			
			break;
	}		
}

function isExhibitor(istrue){
	destObj=document.getElementById('exhibitior_locations');
	if(istrue){
		destObj.className='visibleObj';
	}else{
		destObj.className='hiddenObj';
	}
}


function showLoginHideForm(isTrue){	
	objLoginDiv = document.getElementById('loginDiv');
	objSignupForm = document.getElementById('signupForm');

	if(isTrue){
		objLoginDiv.className='visibleObj';
		objSignupForm.className='hiddenObj';
	}else{
		objLoginDiv.className='hiddenObj';
		objSignupForm.className='visibleObj';
	}
}

function selectLevel(obj){
	objSelectedLevel = document.getElementById('selectedLevel');
	objSelectedLevel.value = obj.value;
}

function countLines(obj, limit){
  tempObj=obj;
  parsedValue = obj.value.replace(/\s+$/g,"");	//trim trailing return char if exists  
  arrLine = parsedValue.split("\n");
  lengthLine = arrLine.length;

  if(lengthLine>limit){	  
	 setTimeout("reenable(" + limit + ")", 5)
	 return false;
  }
  return true;  
}

	function reenable(limit) {
		if (tempObj) {
			caption = tempObj.getAttribute("caption");
			alert("You cannot enter more than " + limit +" keywords");
			//alert(caption + ' should be limited with \"' + limit + '\"');		
			tempObj.focus();
			tempObj = null;
		}
	}



function countChars(obj, limit){
	tempObj=obj;
	parsedValue = obj.value.replace(/\s+$/g,"");	//trim trailing return char if exists  
	arrLine = parsedValue.split(" ");
	lengthLine = arrLine.length;

	if(lengthLine>limit){	  
		setTimeout("reenable(" + limit + ")", 5)
		return false;
	}
	return true; 
}