function showRegion(sbox) {
	if (sbox.value=='') { return; } 
	window.location.href=sbox.value+'/';	
}



function menuRollOver(id) {
	id.style.cursor = 'pointer';
        imgFile = id.src;
        if (imgFile.search(/red/)!=-1) {
                //id.src=imgFile.replace('red', 'blue');
                //id.style.marginTop='1px';
                //id.style.marginLeft='0px';
                id.src=imgFile.replace('red', 'blue');
        }
}
function menuRollOut(id) {
        imgFile = id.src;
        if (imgFile.search(/blue/)!=-1) {
                id.src=imgFile.replace('blue', 'red');
                //id.style.marginTop='0px';
                //id.style.marginLeft='2px';
        }
}
                                                                                                                                               
function navRollOver(thisPage) {
        imgId = document.getElementById(thisPage+'Img');
        lnkId = document.getElementById(thisPage);
        img = imgId.src.replace(/blue/, "red");
        imgId.src=img;
        lnkId.className='leftnavfontred';
}
function navRollOut(thisPage) {
        imgId = document.getElementById(thisPage+'Img');
        lnkId = document.getElementById(thisPage);
        img = imgId.src.replace(/red/, "blue");
        imgId.src=img;
        lnkId.className='leftnavfont';
}
                                                                                                                                               
                                                                                                                                               
function checkEmail(field, message) {
        re = /^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
        if (field.value.match(re) == null) {
                alert('Please fill in correct ' + message + '.');
                field.focus();
                field.select();
                return false;
        }
        return true;
}

function checkText(field, message) {
        if (field.value.replace(/\s/g, '') == '') {
                alert('Please enter your ' + message + '.');
                field.focus();
                field.select();
                return false;
        }
        return true;
}
                                                                                                                                               
                                                                                                                                               
function validateContactForm(form) {
        name = form.fullname.value;
        email = form.email.value;
        subject = form.subject.value;
        message = form.message.value;
        if (!checkText(form.fullname, "Name")) return false;
        if (!checkText(form.email, "email")) return false;
        if (!checkEmail(form.email, "email")) return false;
        if (!checkText(form.subject, "Subject")) return false;
        if (!checkText(form.message, "Message")) return false;
        //form.submit();
        return true;
}
                                                                                                                                               
function validateAdvertisingForm(form) {
        fname = form.fname.value;
        lname = form.surname.value;
        company = form.company.value;
        email = form.email.value;
        address = form.address.value;
	
        if (!checkText(form.fname, "First name")) return false;
        if (!checkText(form.surname, "Surname")) return false;
        if (!checkText(form.company, "Company")) return false;
		
        if (!checkText(form.email, "email")) return false;
        if (!checkEmail(form.email, "email")) return false;
        if (!checkText(form.address, "Postal address")) return false;
        //form.submit();
        return true;
}




 window.onload = function()
  {
      /*
      The new 'validTags' setting is optional and allows
      you to specify other HTML elements that curvyCorners
      can attempt to round.

      The value is comma separated list of html elements
      in lowercase.

      validTags: ["div", "form"]

      The above example would enable curvyCorners on FORM elements.
      */
      settings = {
          tl: { radius: 20 },
          tr: { radius: 20 },
          bl: { radius: 20 },
          br: { radius: 20 },
          antiAlias: true,
          autoPad: true,
          validTags: ["div"]
      }

      /*
      Usage:
      newCornersObj = new curvyCorners(settingsObj, classNameStr);
      newCornersObj = new curvyCorners(settingsObj, divObj1[, divObj2[, divObj3[, . . . [, divObjN]]]]);
      */
      var myBoxObject = new curvyCorners(settings, "myTFTBox");
      myBoxObject.applyCornersToAll();
}



function mainClick() {
        alert('Please select your region first.');
        return ;
}



