// JavaScript Document

$(document).ready(function() {
		
		$('.frame-center').cycle();
		
		$('.about-image').cycle({
			timeout: 6000,
			speed: 2000
		});
		
		$('.frame-center-gallery').cycle({ 
			fx: 'scrollHorz',
			prev:   '#frame-left-arrow', 
			next:   '#frame-right-arrow', 
			timeout: 0,
			speed: 1000
		});
		
});

function checkEmail(myForm) {
if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.emaile.value)){
return (true)
}
alert("Invalid E-mail Address! Please re-enter.")
return (false)
}


function init(){
	var inp = document.getElementsByTagName('input');
	for(var i = 0; i < inp.length; i++) {
		if(inp[i].type == 'text') {
			inp[i].setAttribute('rel',inp[i].defaultValue)
			inp[i].onfocus = function() {
				if(this.value == this.getAttribute('rel')) {
					this.value = '';
				} else {
					return false;
				}
			}
			inp[i].onblur = function() {
				if(this.value == '') {
					this.value = this.getAttribute('rel');
				} else {
					return false;
				}
			}
			inp[i].ondblclick = function() {
				this.value = this.getAttribute('rel')
			}
		}
	}
}
if(document.childNodes) {
	window.onload = init
}