function swf(src, w, h)
{
	html = '';
	html += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" WIDTH="'+w+'" HEIGHT="'+h+'">';
	html += '<PARAM NAME=movie VALUE="'+src+'">';
	html += '<PARAM NAME=quality VALUE=high>';
	html += '<PARAM NAME="wmode" value="transparent" />';
	html += '<EMBED src="'+src+'" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" wmode="transparent"  WIDTH="'+w+'" HEIGHT="'+h+'"></EMBED>';
	html += '</OBJECT>';
	document.write(html);
}

function setInnerTextProperty() {
 if(typeof HTMLElement != "undefined" && typeof HTMLElement.prototype.__defineGetter__ != "undefined") {
  HTMLElement.prototype.__defineGetter__("innerText",
  function() {
   if(this.textContent) {
    return(this.textContent)
   } else {
    var r = this.ownerDocument.createRange();
    r.selectNodeContents(this);
    return r.toString();
   }
  });

  HTMLElement.prototype.__defineSetter__("innerText",
  function(sText) {
   this.innerHTML = sText
  });
 }
}

function SetValidationMsg(title, place)
{
	setInnerTextProperty();
	switch (title)
	{
		 
		case "Empty" :
			document.getElementById(place).innerText = "";
			break;					
		case "LastName" :
			document.getElementById(place).innerText = "* Enter Last Name";
			break;					
		case "FirstName" :
			document.getElementById(place).innerText = "* Enter First Name";
			break;					
		case "Quest" :
			document.getElementById(place).innerText = "* Enter Source";
			break;	 			
		case "MaxLength" :
			document.getElementById(place).innerText = "* Max 254 characters limit";
			break;	 				
		case "Email" :
			document.getElementById(place).innerText = "* Enter Email Address";
			break;			
		case "EmailType" :
			document.getElementById(place).innerText = "* Enter Email Address";
			break;	
		case "General" :
			document.getElementById(place).innerText = "*";
			break;		
	}
}

function SetValidationMsgWithID(id, title, place)
{
	setInnerTextProperty();
	switch (title)
	{
		case "Success" :
			document.getElementById(place).innerText = id + " is available.";
			break;
		case "Fail" :
			document.getElementById(place).innerText = id + " is unavailable.";
			break;
	}
}

function createXMLHttpRequest() {
    if (window.ActiveXObject) {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
    }
    else if (window.XMLHttpRequest) {
        xmlHttp = new XMLHttpRequest();
    }
}