function Feedback(Category,SectionName,title,url){
//	var ty = FBType
	if (Category == "") { var sec = ""; } else { var sec = Category; }	
	if (title == "") { var title = ""; } else { var title = title; }
	if (url == "") { var orgurl = "undefined"; } else { var orgurl = url; }
  var FeedbackWindow;
  var appstr = "?cat_id="+sec+"&orgurl="+orgurl+"&title="+title
//	  alert(appstr)
	  FeedbackWindow = window.open("/en/main/feedback.asp"+appstr, "FeedbackWindow", "width=480,height=580,scrollbars=no");
}


function check_fromaddr(emailaddr) {
	if (emailaddr.length == "0") {
		alert("You must enter your email address")
		return false;
	} else {
		// check its valid
		if (!validate_emailaddr(emailaddr)) {
			alert("Your email address is invalid - please re-enter");
			return false;
		}
	}
	return true;
}

function validate_emailaddr(emailaddr) {
// validate a given email address
   if (emailaddr.indexOf("@") < 1)  {
		return false; // checking its @ symbol is not the first character...
   } else {
		if (emailaddr.indexOf(".",emailaddr.indexOf("@")) < emailaddr.indexOf("@")) {
			return false;  // checking that there is a . after the @ symbol
		}
	}		
return true; // if everything is ok then return true
}
