// MINI-HELP MESSAGES

approve_text = "Approve this application & send mail to the user"
payment_text = "Move application to 'Sent to payment'-group. No mail will be sent."
processing_text = "Move application to 'Processing'-group. No mail will be sent."
name_text = "Send mail regarding wrong name in application - and move to Trash."
trouble_text = "Move application to Trouble. No mail will be sent."

reject_text = "Reject & send mail: Input reason"
reject_real_text = "Reject & send mail: Already signed up with other tracker"
reject_play_text = "Reject & send mail: Not regged with the right tracker yet"
reject_na_text = "Reject & send mail: No account found"
reject_div_text = "Reject & send mail: Something inaccurate"

block_text = "Block user (prevents the user from signing up again with the above details)"
delete_text = "Delete this application (affiliate + trackers also) - NO mail will be sent"
cashier_text = "Move this app. to 'Cashier' group, and send mail to the user"
unknown_text = "Move this app. to 'Unknown' group, no e-mail will be sent"
trash_text = "Move this app. to 'Trash' group, no e-mail will be sent"
ip_text = "Move this app. to 'IP' group, and send mail to the user regarding IP conflict"
verify_text = "Verify this application, and make it ready to Approve"
next_text = "Go to Next application"
previous_text = "Go to Previous application"

poi_readable_text = "ID not visible/readable - request upload of new POI"
poi_invalid_text = "ID not valid - request upload of new POI"
investigate_text = "Move application to Investigation-group (no e-mail will be sent)"
visa_text = "Send mail requesting new ID (or front/back of VISA)"

b_text = "Mark the text to make BOLD and click the 'B' button";
i_text = "Mark the text to make ITALIC and click the 'I' button";
u_text = "Mark the text to make UNDERLINED and click the 'U' button";
div_text = "Insert a DIVIDER line (blue, with fadeout effect in right side)";

popup_text = "Opens the editor in a larger window";

size_text = "Alter the SIZE of your text";
font_text = "Alter the FONT of your text";
color_text = "Alter the COLOR of your text";

url_text = "Insert a hyperlink into your text (links will open in NEW window)";
url_current_text = "Insert a hyperlink into your text (links will open in CURRENT window)";
email_text = "Insert an email-link into your text";
img_text = "Insert an image into your text";

// TEXT FOR POP-UP PROMPTS

tag_prompt = "Enter the text to be formatted:";

font_formatter_prompt = "Enter the text to be formatted with the specified";

link_text_prompt = "Enter the text to be displayed for the link (optional)";
link_url_prompt = "Enter the full URL for the link";
link_email_prompt = "Enter the email address for the link";

// *******************************************************

function stat(theform,thevalue) {
	theform.status.value = eval(thevalue+"_text");
}

// *******************************************************

function namedlink(theform,thetype,target) {
// inserts named url or email link 
	linktext = prompt(link_text_prompt,"");
		var prompttext;
		if (thetype == "URL") {
			prompt_text = link_url_prompt;
			prompt_contents = "http://";
			mailto = "";
			}
		else {
			prompt_text = link_email_prompt;
			prompt_contents = "";
			mailto = "mailto:";
			}
	linkurl = prompt(prompt_text,prompt_contents);
	if ((linkurl != null) && (linkurl != "")) {
		if ((linktext != null) && (linktext != ""))
			theform.Text.value += "<a href='"+mailto+""+linkurl+"' target='"+target+"'>"+linktext+"</a>";
		else
			theform.Text.value += "<a href='"+mailto+""+linkurl+"' target='"+target+"'>"+linkurl+"</a>";
		}
	theform.Text.focus();
}

// *******************************************************

function validate_prebackerform(theform) {
		if (theform.Email.value=="") {
			alert("Please supply a valid e-mail adress, as activation link will be sent here!");
			return false; }
		if (theform.Email.value.length < 6) {
			alert("The e-mail adress you specified is not valid!\nPlease supply a valid e-mail adress, as activation link will be sent here!"); 
			return false; }
		if (theform.Email2.value=="") {
			alert("You need to confirm your e-mail adress!");
			return false; }
		if (theform.Email2.value != theform.Email.value) {
			alert("E-mail adresses do not match!");
			return false; }
		else { return true; }
}

// *******************************************************

function validate2(theform) {
	if (theform.first_Name.value=="" || theform.last_Name.value=="" || theform.PP_name.value=="" || theform.PP_code.value=="" || theform.Country.value=="x" || theform.Born.value=="x" || theform.Gender.value=="x" || theform.StreetAddress.value=="" || theform.ZipCode.value=="" || theform.City.value=="" || theform.Phone.value=="" ) {
		alert("Please complete all the fields, or you will not be eligible for the free dollars !!\n\nFields needed:\n- Name / E-mail / Gender / Born / Street Address / Zip code & City / Phone Number / Country / Accountname / Bonus code\n\n\nFields NOT needed:\n- Where did you hear about us?");
		return false; }
	if (theform.cashier_reg.checked == false ) {
		alert("Please confirm that you have filled out the Cashier info!\nIf you have not yet done so, please do!\nOtherwise we cannot transfer the bonus to your account!");
		return false; }		
//	if (theform.Email.value.length <6) {
//		alert("Your e-mail adress is incorrect.\nPlease supply a valid e-mail adress.")
//		return false; }
//	if (theform.Phone.value.length <8) {
//		alert("Your phonenumber is incorrect.\nIn order to recieve your $25 bonus we need to contact you by telephone.\n\nRemember your countrycode.");
//		return false; }
		else { return true; }
}

// *******************************************************

function validate3(theform) {
	if (theform.first_Name.value=="" || theform.Email.value.length<6 || theform.last_Name.value=="" || theform.PP_name.value=="" || theform.Country.value=="x" || theform.Born.value=="x" || theform.Gender.value=="x" || theform.StreetAddress.value=="" || theform.ZipCode.value=="" || theform.City.value=="" || theform.bonuscode.value=="" || theform.Phone.value=="" ) {
		alert("Please complete all the fields with valid information, otherwise we will not be able to create your Affiliate Account.");
		return false; }
		else { return true; }
}

// *******************************************************

function validate_forum(theform) {
	if (theform.Subject.value=="" || theform.Text.value=="") {
		alert("You cannot make a post without a subject and content!\nPlease make sure that both Subject and Message are filled out!");
		return false; }
	if (theform.Subject.value.length >50) {
		alert("Your subject is too long - please make it shorter!")
		return false; }
		else { return true; }
}

// *******************************************************

function InsertTag(theform,startTag,endTag) {
	var txtarea = theform.Text;

	if (document.selection) {
		theSelection = document.selection.createRange().text;
		if (!theSelection) {
			txtarea.value += startTag + endTag;
			txtarea.focus();
			return;
		}
		document.selection.createRange().text = startTag + theSelection + endTag;
		txtarea.focus();
		return;
	}
	else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
	{
		Mozilla(txtarea, startTag, endTag);
		return;
	}
	else
	{
		txtarea.value += startTag + endTag;
		txtarea.focus();
	}
}

// *******************************************************

function validate_affiliate_bonuscode(theform) {
	if (theform.bonuscode.value=="") {
		alert("You must supply a bonuscode so that we can track your referred players to you!\nThe bonuscode is optional.\n\nExamples: GET100, VIP100, BONUS, FREEDOLLARS etc.");
		return false; }
	if (theform.bonuscode.value.length <3) {
		alert("Your bonuscode is too short.\nMinimum 3 characters.")
		return false; }
		else { return true; }
}

// *******************************************************