

function submit_tell_friend(form, type, templ){
	real_action = '/tell_friend.php'
	target="_tell_friend"
	if (type != 3){
		email = form.friendsemail.value
		arr = email.match("^[0-9a-zA-Z]([0-9a-zA-Z\._\-]*)@(([0-9a-zA-Z\-]+\.)+)([0-9a-zA-Z\-]+)$")
	
		if (!arr){
			alert("Please enter valid email")
			return
		}
	}
	
	if (type == 2){
		window.open(real_action + "?type=2&friend_email=" + escape(email), target, "width=580, height=400, location=0, menubar=0, status=0, resizable=1");
	}else if (type == 3){
		window.open(real_action + "?type=3&templ=" + escape(templ), target, "width=580, height=400, location=0, menubar=0, status=0, resizable=1");
	}else{
		window.open(real_action + "?friend_email=" + escape(email), target, "width=580, height=400, location=0, menubar=0, status=0, resizable=1");
	}
	
}

function wopen2(url){
	window.open(url, 'ww', 'width=600, height=450, location=no,resizable=yes,scrollbars=yes');
}

function wopen(url){
	window.open(url, 'ww', 'width=550, height=450, location=no,resizable=yes,scrollbars=yes');
}

/*function submit_wish(){
	var real_action = 'wish.php';
	var target="Thank_You";
	var wish = document.forms['wish_form'].wish.value;
	var url = document.forms['wish_form'].url.value;
	if( wish.length < 1  ){
		alert("Enter subject you can not find, please !");
	}else if( url.length < 1){
		alert("Enter url of a sample site, please !");
	}else{
		window.open( real_action+"?wish="+escape(wish)+"&url="+escape(url)+"&wish_type=<?=(isset($wish_type) ? $wish_type : "1")?>", target, "location=0, menubar=0, status=0, resizable=1" );
	}
}*/




