function hidebm () {
	document.getElementById('bootmark').className = 'boormark';
	document.getElementById('shareit').className = '';	
}
function FaceHeightDiv () {
	with (document) {
		for (var i = 0; i<=4; i++) {			
			var obj1 = getElementById('a_1_'+i);
			var obj2 = getElementById('a_2_'+i);
			if (obj1 && obj2) {
				if (obj1.clientHeight >= obj2.clientHeight) obj2.style.height = obj1.clientHeight+'px';
				else obj1.style.height = obj2.clientHeight+'px';
			}
			var obj3 = getElementById('b_1_'+i);
			var obj4 = getElementById('b_2_'+i);
			if (obj3 && obj4) {
				if (obj3.clientHeight >= obj4.clientHeight) obj4.style.height = obj3.clientHeight+'px';
				else obj3.style.height = obj4.clientHeight+'px';
			}

		}
	}
}
function IndexHeight(id, str, stb) {
	var max_h = new Array();
	for (var i = 1; i <= str; i++) max_h[i] = 0;
	with (document) {
		for (var i = 1; i <= str; i++) {
			for (var k = 1; k <= stb; k++) {
				if (getElementById(id+'_'+i+'_'+k).clientHeight > max_h[i]) {
					max_h[i] = getElementById(id+'_'+i+'_'+k).clientHeight;
				}
			}
		}		
		for (var i = 1; i <= str; i++) {
			for (var k = 1; k <= stb; k++) {
				 getElementById(id+'_'+i+'_'+k).style.height = max_h[i]+'px';
			}
		}
	}
}

function trim(x) {
	var ch,c;
	ch=x.toString();
	c=ch.charAt(0);
	while(c==" ") { 
		ch=ch.slice(1);
		c=ch.charAt(0);
	}
	c=ch.charAt(ch.length-1);
	while(c==" ") { 
		ch=ch.slice(0,-1);
		c=ch.charAt(ch.length-1);
	}
	return ch;
}
function check_mail(email) { 
	var re = new RegExp("^[\\w\\.-]+@[\\w\\.-]+\\.[A-Za-z]{2,}");
  	return (re.test(email));
}
function pr_Inp(obj,cl,fl) {
	if((fl)?check_mail(obj.value):trim(obj.value)) {
		obj.className=cl;
		return true;
	}
	else {
		obj.className=cl+'_err';
		obj.focus();
		return false;
	}
}
function cu_Form() {
	with(document) {
		var ok=0;
		//if(getElementById('cu_not')) Show_Hide('cu_not','c_num');
		if(pr_Inp(form_4371.ch_num,'contact_is')) ++ok;
		if(pr_Inp(form_4371.bodymessg,'txt_area')) ++ok;
		//if(pr_Inp(form_4371.question,'c_form_i')) ++ok;
		if(pr_Inp(form_4371.email,'contact_i',true)) ++ok;
		if(pr_Inp(form_4371.fname,'contact_i')) ++ok;
		if(ok==4) {
			form_4371.action.value='2';
			form_4371.submit();
		}
	}
}
