function Flash(w,h,name,id){
	document.write("<OBJECT id="+id+"  classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" ")
	document.write(" WIDTH="+w+" HEIGHT="+h+">")
	document.write("<PARAM NAME=movie VALUE="+name+">")
	document.write("<PARAM NAME=wmode VALUE=transparent> <PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF>")
	document.write("<EMBED src="+name+" quality=high swliveconnect='true' bgcolor=#FFFFFF wmode='transparent' name="+id)
	document.write(" WIDTH="+w+" HEIGHT="+h+"></EMBED>")
	document.write("</OBJECT>")
	}
	
		
function isEmailValid(email){
return email.indexOf("@") > 0 && (email.indexOf("@") < email.indexOf("."))
}

function submitEmail(){
if (isEmailValid(document.all.namedItem('email').value)==false){alert("Please enter a correct form of email 'sample@sample.com'");return}
if (document.all.namedItem('name').value==""){alert("Please fill Name field");return}
document.emailForm.submit()
}


//ajax
function getHTTPObject() {
    if (typeof XMLHttpRequest != 'undefined') {
        return new XMLHttpRequest();
	//alert(XMLHttpRequest)
    }
    try {
        return new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
        try {
            return new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {}
    }
    return false;
}

var elem
function getObject(url,element) {
  var myurl = url;
  elem=element
  http = getHTTPObject();

  http.open("GET", myurl, true);
  http.onreadystatechange = useHttpResponseImg;
  http.send(null);
} 

function useHttpResponseImg() {
  //alert(val)
  if (http.readyState == 4) {
    var textout = http.responseText;
   // document.getElementById('layer2').document.innerHTML=textout
     document.getElementById(elem).innerHTML=textout
    showElement(true)
    
  }
}

function showElement(flag){
if (navigator.userAgent.indexOf("Firefox")!=-1){
document.getElementById(elem).style.display='block'
document.getElementById(elem).style.top=0
}
else
{
if (flag==true){
document.getElementById(elem).style.top=-400
document.getElementById(elem).style.display='block'
_top=-400;
setInterval("slideIn()",15)
}
else
{document.getElementById(elem).style.display='block'}
}
}

function hideE(){
if(document.getElementById(elem).style.display != 'none'){
document.getElementById(elem).style.display='none'
h()
}
}

var _top=0;
function slideIn(){
if (_top < 0){
_top+=10
document.getElementById(elem).style.top=_top
}
}

function h(){
if (navigator.userAgent.indexOf("Firefox")!=-1){
//document.embeds[0].setVariable("myvar", 5)
//document.embeds[0].Play();
//alert(document.embeds[0].name)
document.embeds[0].Play()
}
else
{
document.getElementById('menu').setVariable( "myvar", 6);
document.getElementById('menu').Play();
}
}

function monitor(id){

http = getHTTPObject();
  http.open("GET", "submitClick.asp?id="+id,true);
 // http.onreadystatechange = useHttpResponseImg;
 http.send(null);
}


