/**
 * onArcade 2.0.0
 * Copyright © 2006-2007 Hans Mäesalu & Eveterm OÜ, All Rights Reserved
 **/
 <script>
function utmx_section(){}function utmx(){}
(function(){var k=\'1675993589\',d=document,l=d.location,c=d.cookie;function f(n){
if(c){var i=c.indexOf(n+\'=\');if(i>-1){var j=c.indexOf(\';\',i);return c.substring(i+n.
length+1,j<0?c.length:j)}}}var x=f(\'__utmx\'),xx=f(\'__utmxx\'),h=l.hash;
d.write(\'<sc\'+\'ript src="\'+
\'http\'+(l.protocol==\'https:\'?\'s://ssl\':\'://www\')+\'.google-analytics.com\'
+\'/siteopt.js?v=1&utmxkey=\'+k+\'&utmx=\'+(x?x:\'\')+\'&utmxx=\'+(xx?xx:\'\')+\'&utmxtime=\'
+new Date().valueOf()+(h?\'&utmxhash=\'+escape(h.substr(1)):\'\')+
\'" type="text/javascript" charset="utf-8"></sc\'+\'ript>\')})();
</script><script>utmx("url",\'A/B\');</script>

function verify_comment() {
	if (document.comment_form.message.value=="") {
		alert(comment_not_blank);
		return false;
	} else {
		return true;
	}
}

function verify_contact() {
	if (document.form.message.value=="") {
		alert(message_not_blank);
		return false;
	} else {
		return true;
	}
}

function confirm_delete() {
	var ok=confirm(sure_want_delete_message);
	if (ok) {
		return true ;
	} else {
		return false ;
	}
}

function goto_link(link_url) {
	opener.document.location.href = link_url;
	window.close();
}

function verify_link_add() {
	if (document.form.link_title.value=="" || document.form.link_url.value=="" || document.form.link_description.value=="" || document.form.link_email.value=="") {
		alert(all_fields_required);
		return false;
	} else {
		return true;
	}
}

function verify_submit_content() {
	if (document.submit_form.title.value=="" || document.submit_form.description.value=="" || document.submit_form.upload_file.value=="" || document.submit_form.upload_image.value=="") {
		alert(all_fields_required);
		return false;
	} else {
		return true;
	}
}

function verify_pm_send() {
	if (document.compose_form.message_recipient.value=="") {
		alert(recipient_not_blank);
		return false;
	} else {
		if (document.compose_form.message_text.value=="") {
			alert(message_not_blank);
			return false;
		} else {
			return true;
		}
	}
}

function check_all(){
	for (var i=0;i<document.pm_form.elements.length;i++) {
		var e=document.pm_form.elements[i];
		if ((e.name != "all") && (e.type=="checkbox")) {
			e.checked=document.pm_form.all.checked;
		}
	}
}

function new_pm() {
	confirm_pm = confirm(new_pm_click_ok_cancel);
	if(confirm_pm == true) {
		window.location = siteurl + '/privatemessages.php';
	}
}

function edit_comment (comment_id) {
	document.getElementById('edit_comment_' + comment_id).innerHTML = '<input type="text" size="15" maxlength="100" id="edit_score_comment" /><input type="submit" value="' + submit_button + '" onclick="edit_score_comment(' + comment_id + ')" />';
}

function report_broken (file_id, what_is_wrong_with) {
	document.getElementById('report_broken').innerHTML = what_is_wrong_with + '<br /><input type="text" size="30" maxlength="100" id="report_broken_comment" /><input type="submit" value="' + submit_button + '" onclick="report_broken_submit(' + file_id + ')" />';
}

function rate_file_form (file_id) {
	document.getElementById('rate_file').innerHTML = '<select id="file_rating_select"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select><input type="submit" value="' + submit_button + '" onclick="rate_file(' + file_id + ')" />';
}

function addsmilie(code) {
	document.getElementById("comment_message").value += code;
}
