function ValidateContact() {
 var FieldList = "";
 var validRegExp;
 var strEmail;

 if (document.getElementById("name").value == "") {
    FieldList = "&nbsp;&bull;&nbsp;Name<br />";
 }

 if (document.getElementById("email").value == "") {
    FieldList = FieldList + "&nbsp;&bull;&nbsp;E-Mail<br />";
 }

 validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;
 strEmail = document.getElementById("email").value;

 if (document.getElementById("email").value != "") {
  if (strEmail.search(validRegExp) == -1) {
    FieldList = FieldList + "&nbsp;&bull;&nbsp;Invalid E-Mail<br />";
  }
 }

 if (document.getElementById("validator").value == "") {
    FieldList = FieldList + "&nbsp;&bull;&nbsp;Security code<br />";
 }

 if (FieldList == "") {
   return( true );
 } else {
   document.getElementById("error_msg").innerHTML = "Please complete next fields:<br />" + FieldList;
   return( false );
 }        
}

function contactForm(act) {
    var block = document.getElementById("contactForm");
    if (act == "show") {
        block.style.display = "block";
//		document.getElementById("contactForm").value = "hide";
		document.getElementById("form_link").innerHTML = '<a href="javascript:void(0);" onclick="contactForm(\'hide\');">hide form</a>';
    } else if (act == "hide") {
        block.style.display = "none";
//		document.getElementById("contactForm").value = "show";
		document.getElementById("form_link").innerHTML = '<a href="javascript:void(0);" onclick="contactForm(\'show\');">show form</a>';
	}
}

function validateAddProperty(pr_name, error_msg) {
 var FieldList = "";

 if (document.getElementById(pr_name).value == "") {
    FieldList = "&nbsp;&bull;&nbsp;Name<br />";
 }

 if (FieldList == "") {
   return( true );
 } else {
   document.getElementById(error_msg).innerHTML = "Please complete next fields:<br />" + FieldList;
   return( false );
 }
}

function delProp(id){
 if(confirm('Are you sure you want to delete this record?')) {
	 window.location.href='admin/index.php?action=delete&id='+id;
 }
}

function jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function delUser(id){
 if(confirm('Are you sure you want to delete this user?\nPlease note that this will delete all the statistics of the respective user!')) {
	 window.location.href='admin/index.php?user-management&action=deleteUser&id='+id;
 }
}

function commingSoon(act) {
    if (act == "sBoro2") {
		document.getElementById("boro2").innerHTML = 'Comming soon...';
		document.getElementById("kraj").innerHTML = '';
    } else if (act == "sKraj") {
		document.getElementById("boro2").innerHTML = '';
		document.getElementById("kraj").innerHTML = 'Comming soon...';
	}
}

function commingSoonCY(act) {
    if (act == "cyCUP") {
		document.getElementById("cypCUP").innerHTML = 'Comming soon...';
		document.getElementById("cypAM").innerHTML = '';
		document.getElementById("cypV3D").innerHTML = '';
		document.getElementById("cypPBS").innerHTML = '';
    } else if (act == "cyAM") {
		document.getElementById("cypCUP").innerHTML = '';
		document.getElementById("cypAM").innerHTML = 'Comming soon...';
		document.getElementById("cypV3D").innerHTML = '';
		document.getElementById("cypPBS").innerHTML = '';
    } else if (act == "cyV3D") {
		document.getElementById("cypCUP").innerHTML = '';
		document.getElementById("cypAM").innerHTML = '';
		document.getElementById("cypV3D").innerHTML = 'Comming soon...';
		document.getElementById("cypPBS").innerHTML = '';
	} else if (act == "cyPBS") {
		document.getElementById("cypCUP").innerHTML = '';
		document.getElementById("cypAM").innerHTML = '';
		document.getElementById("cypV3D").innerHTML = '';
		document.getElementById("cypPBS").innerHTML = 'Comming soon...';
	}
}