function for_mozilla(id1, id2) {
	
	document.getElementById(id1).value = id2;
}

function IsEmailAddress(mail){
	
	var addressPattern = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/;
	return addressPattern.test(mail);
}

function jump_to_pass(){
	
	document.getElementById('hidden_pass').value = document.getElementById('password_tmp').value;
}

function OnPasswordFocus(){
	
	document.getElementById('pass_td').innerHTML = "<input type='password' name='password_tmp' id='password_tmp' style='width:110px;'>";
	document.getElementById('password_tmp').focus();
}

function isPhoneNumber(phone){
	
	var detect;
	var CharArray = new  Array(' ', '(', ')', '+', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9');
	
	for( var j=0; j < phone.length; j++ ){
		
		var PhoneChar = phone.substring( j, j+1 );
		
		detect = false;
		
		for( var z=0; z < CharArray.length; z++ ){
			
			if( PhoneChar == CharArray[z] ){
				
				detect = true;
			} 
		}
		
		if(detect == false){
			
			break;
		}
	}
	
	if(phone.length<5){
		
		detect = false;
	}
	
	return detect;
}

function detect(){ 
		
	if( document.c_form.c_name.value == "" ){
		
		alert('Please enter your Name');
		document.c_form.c_name.focus();
		return false;
	}
	
	if( document.c_form.c_email.value != "" && !IsEmailAddress(document.c_form.c_email.value) ){
		
		alert('Email address is incorrect. Please type real email address.');
		document.c_form.c_email.focus();
		return false;
	}
	
	if( document.c_form.c_phone.value != "" && !isPhoneNumber(document.c_form.c_phone.value) ){
		
		alert('Phone number is incorrect. Please type real phone number.');
		document.c_form.c_phone.focus();
		return false;
	}
	
	if( document.c_form.c_message.value == "" ){
		
		alert('Please enter your Message');
		document.c_form.c_message.focus();
		return false;
	}	
	
	return true;
}




if ( true ) {
		
	var FlOrHt = "_flash_";
	
	var IE = document.all?true:false
	
	if (!IE) document.captureEvents(Event.MOUSEMOVE)
	
	document.onmousemove = getMouseXY;
	
	var tempX = 0
	var tempY = 0
}
var realStop = false;

var xxx = 0;
var yyy = 0;

function getMouseXY(e) {
	
  if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } 
  else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0}
  if (tempY < 0){tempY = 0}  
  
	xxx = tempX - 10;
	yyy = tempY - 160;
	
	if(!realStop) {
		
		document.getElementById("event_div").style.top = tempY - 160 + "px";
		document.getElementById("event_div").style.left = tempX - 10 + "px";
	}
	
  return true;
  
}

function stopXY(typez) {
	
	if(typez == "open") {
		
		realStop = true;
	} else if(typez == "close") {
		
		realStop = false;
		document.getElementById("event_div").style.top = yyy + "px";
		document.getElementById("event_div").style.left = xxx + "px";
	}
}