function checkEmail(email) {

	var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

	if (!filter.test(email))
		return false;
	else
		return true;
}

DOMHelper = {
  init:function(){
    // Check if the JS is supported
    DOMHelper.js = false;
    if(document.getElementById)
      DOMHelper.js = true;   
    
    setFlashTransparent();
  },
  
  /* Get element by class */
  getElementByClass:function(theClass){
  }
}

/* Set flash to transparent */
function setFlashTransparent(){
      try{
        // Step 1 : Find all flash objects
        var objects =  document.getElementsByTagName("object");
        for(key in objects){
          var object = objects[key];
          if(object.tagName == "OBJECT" || object.tagName=="object"){
            // check for flash content
            var classid = object.getAttribute("classid");
            if(classid == "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"){

              // STEP 2: Clone the flash node and set the suitable properties to transparent
              var clone = object.cloneNode(true);
              // get all children
              var children = clone.childNodes;
              
              // Browse all children
              for(var i = 0; i < children.length; i++){
                if(children[i].tagName == "EMBED" || children[i].tagName == "embed"){
                  children[i].setAttribute("wmode", "transparent");
                  

                }
                else if(children[i].tagName == "PARAM" || children[i].tagName == "param"){
                  // Find for the param named : wmode
                  var name = children[i].getAttribute("name");
                  if(name == "wmode" || name== "WMODE"){
                    // Set attribute to transparent
                    children[i].setAttribute("value", "transparent");
                    
                  }
                }
              }
              
              // STEP 3 and FINAL: Replace the oldflash with the new one
              object.parentNode.replaceChild(clone, object);
            }
          }
        }
        
      
      }
      catch(e){
        alert("Error  in setFlashTransparent: " + e);
      }
    }

window.onload = DOMHelper.init;
