function enviarFormBusca(opcao)
{
	var erro = true;

	if(document.form_busca.classificados.checked == true)
	{
		erro = false;
		document.form_busca.action = "?menu=classificados";
	}
	else if(document.form_busca.empresas.checked == true)
	{
		erro = false;
		document.form_busca.action = "?menu=empresas";
	}
	else if(document.form_busca.fornecedores.checked == true)
	{
		erro = false;
		document.form_busca.action = "?menu=fornecedores";
	}

	return !(erro);
}

//Ajax
function sack(file) {
	this.xmlhttp = null;

	this.resetData = function() {
		this.method = "POST";
  		this.queryStringSeparator = "?";
		this.argumentSeparator = "&";
		this.URLString = "";
		this.encodeURIString = true;
  		this.execute = false;
  		this.element = null;
		this.elementObj = null;
		this.requestFile = file;
		this.vars = new Object();
		this.responseStatus = new Array(2);
  	};

	this.resetFunctions = function() {
  		this.onLoading = function() { };
  		this.onLoaded = function() { };
  		this.onInteractive = function() { };
  		this.onCompletion = function() { };
  		this.onError = function() { };
		this.onFail = function() { };
	};

	this.reset = function() {
		this.resetFunctions();
		this.resetData();
	};

	this.createAJAX = function() {
		try {
			this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e1) {
			try {
				this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e2) {
				this.xmlhttp = null;
			}
		}

		if (! this.xmlhttp) {
			if (typeof XMLHttpRequest != "undefined") {
				this.xmlhttp = new XMLHttpRequest();
			} else {
				this.failed = true;
			}
		}
	};

	this.setVar = function(name, value){
		this.vars[name] = Array(value, false);
	};

	this.encVar = function(name, value, returnvars) {
		if (true == returnvars) {
			return Array(encodeURIComponent(name), encodeURIComponent(value));
		} else {
			this.vars[encodeURIComponent(name)] = Array(encodeURIComponent(value), true);
		}
	}

	this.processURLString = function(string, encode) {
		encoded = encodeURIComponent(this.argumentSeparator);
		regexp = new RegExp(this.argumentSeparator + "|" + encoded);
		varArray = string.split(regexp);
		for (i = 0; i < varArray.length; i++){
			urlVars = varArray[i].split("=");
			if (true == encode){
				this.encVar(urlVars[0], urlVars[1]);
			} else {
				this.setVar(urlVars[0], urlVars[1]);
			}
		}
	}

	this.createURLString = function(urlstring) {
		if (this.encodeURIString && this.URLString.length) {
			this.processURLString(this.URLString, true);
		}

		if (urlstring) {
			if (this.URLString.length) {
				this.URLString += this.argumentSeparator + urlstring;
			} else {
				this.URLString = urlstring;
			}
		}

		this.setVar("rndval", new Date().getTime());

		urlstringtemp = new Array();
		for (key in this.vars) {
			if (false == this.vars[key][1] && true == this.encodeURIString) {
				encoded = this.encVar(key, this.vars[key][0], true);
				delete this.vars[key];
				this.vars[encoded[0]] = Array(encoded[1], true);
				key = encoded[0];
			}

			urlstringtemp[urlstringtemp.length] = key + "=" + this.vars[key][0];
		}
		if (urlstring){
			this.URLString += this.argumentSeparator + urlstringtemp.join(this.argumentSeparator);
		} else {
			this.URLString += urlstringtemp.join(this.argumentSeparator);
		}
	}

	this.runResponse = function() {
		eval(this.response);
	}

	this.runAJAX = function(urlstring) {
		if (this.failed) {
			this.onFail();
		} else {
			this.createURLString(urlstring);
			if (this.element) {
				this.elementObj = document.getElementById(this.element);
			}
			if (this.xmlhttp) {
				var self = this;
				if (this.method == "GET") {
					totalurlstring = this.requestFile + this.queryStringSeparator + this.URLString;
					this.xmlhttp.open(this.method, totalurlstring, true);
				} else {
					this.xmlhttp.open(this.method, this.requestFile, true);
					try {
						this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
					} catch (e) { }
				}

				this.xmlhttp.onreadystatechange = function() {
					switch (self.xmlhttp.readyState) {
						case 1:
							self.onLoading();
							break;
						case 2:
							self.onLoaded();
							break;
						case 3:
							self.onInteractive();
							break;
						case 4:
							self.response = self.xmlhttp.responseText;
							self.responseXML = self.xmlhttp.responseXML;
							self.responseStatus[0] = self.xmlhttp.status;
							self.responseStatus[1] = self.xmlhttp.statusText;

							if (self.execute) {
								self.runResponse();
							}

							if (self.elementObj) {
								elemNodeName = self.elementObj.nodeName;
								elemNodeName.toLowerCase();
								if (elemNodeName == "input"
								|| elemNodeName == "select"
								|| elemNodeName == "option"
								|| elemNodeName == "textarea") {
									self.elementObj.value = self.response;
								} else {
									self.elementObj.innerHTML = self.response;
								}
							}
							if (self.responseStatus[0] == "200") {
								self.onCompletion();
							} else {
								self.onError();
							}

							self.URLString = "";
							break;
					}
				};

				this.xmlhttp.send(this.URLString);
			}
		}
	};

	this.reset();
	this.createAJAX();
}

var ajax = new Array();


//Cidade Estado
function Cidade(sel)
{
	var estadoCodigo = sel.options[sel.selectedIndex].value;
	document.getElementById('cidade').options.length = 0;
	if(estadoCodigo.length>0){
		var index = ajax.length;
		ajax[index] = new sack();
		
		ajax[index].requestFile = 'php/cidade.php?estado='+estadoCodigo;
		ajax[index].onCompletion = function(){ CriarCidade(index) };
		ajax[index].runAJAX();
	}
}
function CriarCidade(index)
{
	var obj = document.getElementById('cidade');
	eval(ajax[index].response);
}

function Estado()
{
	var Codigo = "";
	document.getElementById('estado').options.length = 0;
		var index = ajax.length;
		ajax[index] = new sack();
		
		ajax[index].requestFile = 'php/estado.php?id='+Codigo;
		ajax[index].onCompletion = function(){ CriarEstado(index) };
		ajax[index].runAJAX();
}
function CriarEstado(index)
{
	var obj = document.getElementById('estado');
	eval(ajax[index].response);
}


function CidadeBus(sel)
{
	var estadoCodigo = sel.options[sel.selectedIndex].value;
	document.getElementById('cidadeb').options.length = 0;
	if(estadoCodigo.length>0){
		var index = ajax.length;
		ajax[index] = new sack();
		
		ajax[index].requestFile = 'php/cidadebusca.php?estado='+estadoCodigo;
		ajax[index].onCompletion = function(){ CriarCidadeBus(index) };
		ajax[index].runAJAX();
	}
}
function CriarCidadeBus(index)
{
	var obj = document.getElementById('cidadeb');
	eval(ajax[index].response);
}

function EstadoBus()
{
	var Codigo = "";
	document.getElementById('estadob').options.length = 0;
		var index = ajax.length;
		ajax[index] = new sack();
		
		ajax[index].requestFile = 'php/estadobusca.php?id='+Codigo;
		ajax[index].onCompletion = function(){ CriarEstadoBus(index) };
		ajax[index].runAJAX();
}
function CriarEstadoBus(index)
{
	var obj = document.getElementById('estadob');
	eval(ajax[index].response);
}


//Segmento
function Segmento(sel)
{
	var segmentoCodigo = sel.value;
	document.getElementById('id').options.length = 0;
	if(segmentoCodigo.length>0){
		var index = ajax.length;
		ajax[index] = new sack();
		
		ajax[index].requestFile = 'php/segmento.php?canal='+segmentoCodigo;
		ajax[index].onCompletion = function(){ CriarSegmento(index) };
		ajax[index].runAJAX();
	}
}
function CriarSegmento(index)
{
	var obj = document.getElementById('id');
	eval(ajax[index].response);
}



//Ajax
function openAjax() {

var ajax;

try{
    ajax = new XMLHttpRequest();
}catch(ee){
    try{
        ajax = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            ajax = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            ajax = false;
        }
    }
}
return ajax;
}


//Verifica
function VerificaAcesso(nome) {
	if(document.getElementById) {
		var cod = document.form_empresa.acessorapido.value;
		var verifica = document.getElementById('verificaacesso');
		if(cod !== "" && cod !== null && cod.length >= 0) {
			var ajax = openAjax();
			ajax.open("GET", "php/acessorapido.php?acesso="+cod+"", true);
			ajax.onreadystatechange = function() {
				if(ajax.readyState == 1) {
					verifica.innerHTML = "Verificando...";
				}
				if(ajax.readyState == 4) {
					if(ajax.status == 200) {
						var resultado = ajax.responseText;
						resultado = resultado.replace(/\+/g," ");
						resultado = unescape(resultado);
						verifica.innerHTML = resultado;
					} else {
						verifica.innerHTML = "";
					}
				}
			}
			ajax.send(null);
		} else if(cod == "") {
			verifica.innerHTML = "";
		}
	}
}

function VerificaEmail(nome) {
	if(document.getElementById) {
		var cod = document.form_cadastro.email.value;
		var verifica = document.getElementById('verificaemail');
		if(cod !== "" && cod !== null && cod.length >= 0) {
			var ajax = openAjax();
			ajax.open("GET", "php/conta.php?email="+cod+"", true);
			ajax.onreadystatechange = function() {
				if(ajax.readyState == 1) {
					verifica.innerHTML = "Verificando...";
				}
				if(ajax.readyState == 4) {
					if(ajax.status == 200) {
						var resultado = ajax.responseText;
						resultado = resultado.replace(/\+/g," ");
						resultado = unescape(resultado);
						verifica.innerHTML = resultado;
					} else {
						verifica.innerHTML = "";
					}
				}
			}
			ajax.send(null);
		} else if(cod == "") {
			verifica.innerHTML = "";
		}
	}
}

function Confirma(form, cn, n, msg) {
	var cn = form[cn].value;
	var n = form[n].value;
	
	var erro = false;
	if(n != cn)
	{
		mensagem = msg;
		erro = true;
	}

	if(erro) alert(mensagem);
	return !(erro);
}

function VerificaSenha(val, tamanho, id) {
	document.getElementById('senhamensagem'+id).innerHTML = "";
 	document.getElementById('senhabaixa'+id).style.background = '#F4F4F4';
 	document.getElementById('senhamedia'+id).style.background = '#EAEAEA';
 	document.getElementById('senhaalta'+id).style.background = '#E0E0E0';
 
	if(val.length >= tamanho && val.search(/[a-z]/) != -1 && val.search(/[A-Z]/) != -1 && val.search(/[0-9]/) != -1 || val.length >= tamanho && val.search(/[a-z]/) != -1 && val.search(/[A-Z]/) != -1 && val.search(/[@!#$%&*+=?|-]/) || val.length >= tamanho && val.search(/[a-z]/) != -1 && val.search(/[@!#$%&*+=?|-]/) != -1 && val.search(/[0-9]/) || val.length >= tamanho  && val.search(/[@!#$%&*+=?|-]/) != -1 && val.search(/[A-Z]/) != -1 && val.search(/[0-9]/)) {
		document.getElementById('senhamensagem'+id).innerHTML = "<font color=\"\#D52800\">Forte</font>";
		document.getElementById('senhabaixa'+id).style.background = '#D52800';
		document.getElementById('senhamedia'+id).style.background = '#D52800';
		document.getElementById('senhaalta'+id).style.background = '#D52800';
	} else {
		if(val.length >= tamanho && val.search(/[a-z]/) != -1 && val.search(/[A-Z]/) != -1 || val.length >= tamanho && val.search(/[a-z]/) != -1 && val.search(/[0-9]/) != -1  || val.length >= tamanho && val.search(/[a-z]/) != -1 && val.search(/[@!#$%&*+=?|-]/) != -1 || val.length >= tamanho && val.search(/[A-Z]/) != -1 && val.search(/[0-9]/) != -1 || val.length >= tamanho && val.search(/[A-Z]/) != -1 && val.search(/[@!#$%&*+=?|-]/) != -1 || val.length >= tamanho && val.search(/[0-9]/) != -1 && val.search(/[@!#$%&*+=?|-]/) != -1) {
			document.getElementById('senhamensagem'+id).innerHTML = "<font color=\"#E4C100\">Média</font>";
			document.getElementById('senhabaixa'+id).style.background = '#E4C100';
			document.getElementById('senhamedia'+id).style.background = '#E4C100';
			document.getElementById('senhaalta'+id).style.background = '#E0E0E0';
		} else {
			if(val.length >= tamanho) {
				document.getElementById('senhamensagem'+id).innerHTML = "<font color=\"#73B401\">Fraca</font>";
				document.getElementById('senhabaixa'+id).style.background = '#73B401';
				document.getElementById('senhamedia'+id).style.background = '#EAEAEA';
				document.getElementById('senhaalta'+id).style.background = '#E0E0E0';
			}
		}
	}
}


//Mural
function ContaCaracteres(){
   intCaracteres = 400 - document.form_mural.mensagem.value.length;
   if (intCaracteres > 0){
      document.getElementById('caracteres').innerHTML = intCaracteres;
      return true;
   }
   else {
      document.getElementById('caracteres').innerHTML = 0;
      document.form_mural.mensagem.value = document.form_mural.mensagem.value.substr(0,400)
      return false;
   }
}

function smile(text) {
	var txtarea = document.form_mural.mensagem;
	text = '' + text + '';
	if (txtarea.createTextRange && txtarea.caretPos) {
		var caretPos = txtarea.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == '' ? text + '' : text;
		txtarea.focus();
	}
	else {
		txtarea.value  += text;
		txtarea.focus();
	}
}


//Mascara
function Mascara(objeto, sMask, evtKeyPress)
{
	var i, nCount, sValue, fldLen, mskLen,bolMask, sCod, nTecla;
	
	if(document.all) { // Internet Explorer
		nTecla = evtKeyPress.keyCode;
	} else if(document.layers) { // Nestcape
		nTecla = evtKeyPress.which;
	} else {
		nTecla = evtKeyPress.which;
		if (nTecla == 8) {
			return true;
		}
	}
	
	sValue = objeto.value;
	
	// Limpa todos os caracteres de formatação que
    // já estiverem no campo.
    sValue = sValue.toString().replace( "-", "" );
    sValue = sValue.toString().replace( "-", "" );
    sValue = sValue.toString().replace( ".", "" );
    sValue = sValue.toString().replace( ".", "" );
    sValue = sValue.toString().replace( "/", "" );
    sValue = sValue.toString().replace( "/", "" );
    sValue = sValue.toString().replace( ":", "" );
    sValue = sValue.toString().replace( ":", "" );
    sValue = sValue.toString().replace( "(", "" );
    sValue = sValue.toString().replace( "(", "" );
    sValue = sValue.toString().replace( ")", "" );
    sValue = sValue.toString().replace( ")", "" );
    sValue = sValue.toString().replace( " ", "" );
    sValue = sValue.toString().replace( " ", "" );
    fldLen = sValue.length;
    mskLen = sMask.length;

    i = 0;
    nCount = 0;
    sCod = "";
    mskLen = fldLen;

    while (i <= mskLen) {
		bolMask = ((sMask.charAt(i) == "-") || (sMask.charAt(i) == ".") || (sMask.charAt(i) == "/") || (sMask.charAt(i) == ":"))
		bolMask = bolMask || ((sMask.charAt(i) == "(") || (sMask.charAt(i) == ")") || (sMask.charAt(i) == " "))
		
		if (bolMask) {
			sCod += sMask.charAt(i);
			mskLen++;
		} else {
			sCod += sValue.charAt(nCount);
			nCount++;
		}
		
		i++;
	}
	
	objeto.value = sCod;
	
	if (nTecla != 8) { // backspace
		if (sMask.charAt(i-1) == "9") { // apenas números...
			return ((nTecla > 47) && (nTecla < 58));
		} else { // qualquer caracter...
			return true;
		}
	} else {
		return true;
	}
}


//Valida
function Valida(objForm, strField, sVali, evtKeyPress, a)
{
	var erro = false;
	var mensagem = "Você deve informar: \n";
	
	var arr = new Array(a);
	
	var str = strField.split("|=|");
	var sva = sVali.split("|=|");
	var evt = evtKeyPress.split("|=|");
	
	for(b = 1; b < a + 1; b++)
	{
		arr[b] = objForm[str[b]].value;

		if(arr[b].length < evt[b])
		{
			mensagem += "\n"+sva[b];
			erro = true;
//			objForm[str[b]].style.borderTopWidth = "1px";
//			objForm[str[b]].style.borderRightWidth = "1px";
//			objForm[str[b]].style.borderBottomWidth = "1px";
//			objForm[str[b]].style.borderLeftWidth = "1px";
//			objForm[str[b]].style.borderTopStyle = "solid";
//			objForm[str[b]].style.borderRightStyle = "solid";
//			objForm[str[b]].style.borderBottomStyle = "solid";
//			objForm[str[b]].style.borderLeftStyle = "solid";
//			objForm[str[b]].style.borderTopColor = "#FF8888";
//			objForm[str[b]].style.borderRightColor = "#CC0000";
//			objForm[str[b]].style.borderBottomColor = "#CC0000";
//			objForm[str[b]].style.borderLeftColor = "#FF8888";
			objForm[str[b]].style.color = "#333333";
			objForm[str[b]].style.background = "#FFCCCC";
			objForm[str[b]].style.border = "1px solid #CC0000";
		}
		else
		{
//			objForm[str[b]].style.borderTopWidth = "1px";
//			objForm[str[b]].style.borderRightWidth = "1px";
//			objForm[str[b]].style.borderBottomWidth = "1px";
//			objForm[str[b]].style.borderLeftWidth = "1px";
//			objForm[str[b]].style.borderTopStyle = "solid";
//			objForm[str[b]].style.borderRightStyle = "solid";
//			objForm[str[b]].style.borderBottomStyle = "solid";
//			objForm[str[b]].style.borderLeftStyle = "solid";
//			objForm[str[b]].style.borderTopColor = "#4D4D4D";
//			objForm[str[b]].style.borderRightColor = "#202020";
//			objForm[str[b]].style.borderBottomColor = "#202020";
//			objForm[str[b]].style.borderLeftColor = "#4D4D4D";
			objForm[str[b]].style.background = "#EBF0F3";
			objForm[str[b]].style.border = "1px solid #00CC00";
		}
	}

//	if(erro) alert(mensagem)
	return !(erro);
}


//Valor
function currencyFormat(fld, milSep, decSep, e) {
	var sep = 0;
	var key = '';
	var i = j = 0;
	var len = len2 = 0;
	var strCheck = '0123456789';
	var aux = aux2 = '';
	var whichCode = (window.Event) ? e.which : e.keyCode;
	if (whichCode == 13) return true;  // Enter
	if (whichCode == 8) return true;  // Delete (Bug fixed)
	key = String.fromCharCode(whichCode);  // Get key value from key code
	if (strCheck.indexOf(key) == -1) return false;  // Not a valid key
	len = fld.value.length;
	for(i = 0; i < len; i++)
	if ((fld.value.charAt(i) != '0') && (fld.value.charAt(i) != decSep)) break;
	aux = '';
	for(; i < len; i++)
	if (strCheck.indexOf(fld.value.charAt(i))!=-1) aux += fld.value.charAt(i);
	aux += key;
	len = aux.length;
	if (len == 0) fld.value = '';
	if (len == 1) fld.value = '0'+ decSep + '0' + aux;
	if (len == 2) fld.value = '0'+ decSep + aux;
	if (len > 2) {
	aux2 = '';
	for (j = 0, i = len - 3; i >= 0; i--) {
	if (j == 3) {
	aux2 += milSep;
	j = 0;
}
	aux2 += aux.charAt(i);
	j++;
	}
	fld.value = '';
	len2 = aux2.length;
	for (i = len2 - 1; i >= 0; i--)
	fld.value += aux2.charAt(i);
	fld.value += decSep + aux.substr(len - 2, len);
}
return false;
}


//Selecionar Checkbox
function SelecionaCheckbox(form, retorno)
{
	var frm = document.form;
	for(i = 1; i < frm.length; i++)
	{
		if(frm.elements[i].type == "checkbox")
		{
			frm.elements[i].checked = frm.elements[i].checked ? false : true
		}
	}
}


function abrir(url)
{
	window.open(""+url, "_parent");
}


//Sair
function sair(url)
{
	if(confirm("Deseja mesmo sair?"))
	{
		window.open("?menu=sair&url="+url+"", "_parent");
	}
}


//Popup Publicidade
function popup(thisitem,startstate)
{
	divname = thisitem;
	this.thediv = document.getElementById(divname);
	this.thediv.style.visibility = startstate;
}

function visible(objeto)
{
	objeto.thediv.style.visibility = "visible";
}

function hidden(objeto)
{
	objeto.thediv.style.visibility = "hidden";
}


//Pop Up
var popUpWin = 0;
function popUp(url, intWi, intHei, scr, intTop, intLeft)
{
	if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}
	
	popUpWin = open(url, "popUpWin","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars="+scr+", resizable=no, menubar=no, width="+intWi+", height="+intHei+", left="+intLeft+", top="+intTop+"");
}


//Flash
if(Browser == undefined){
	var Browser = {
		isIE: function(){ return (window.ActiveXObject && document.all && navigator.userAgent.toLowerCase().indexOf("msie") > -1  && navigator.userAgent.toLowerCase().indexOf("opera") == -1) ? true : false; }
	}
}

var Flash = function(movie, id, width, height, initParams){

	this.html = "";
	this.attributes = this.params = this.variables = null;
	
	this.variables = new Array();
	this.attributes = {
		"classid": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
		"codebase": "http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=8,0,22,0",
		"type": "application/x-shockwave-flash"
	}
	this.params = { "pluginurl": "http://www.macromedia.com/go/getflashplayer_br" };
	
	if(movie) {
		this.addAttribute("data", movie);
		this.addParameter("movie", movie);
	}
	
	if(id && id != null) this.addAttribute("id", id);
	if(width) this.addAttribute("width", width);
	if(height) this.addAttribute("height", height);
	
	if(initParams != undefined){
		for(var i in initParams){
			this.addParameter(i.toString(), initParams[i]);
		}
	}
	
}
Flash.version = "1.2b";
Flash.getObjectByExceptions = function(obj, excep){
	var tempObj = {};
	for(var i in obj){
		var inclui = true;
		for(var j=0; j<excep.length; j++)
			if(excep[j] == i.toString()) { inclui = false; break; };
		if(inclui) tempObj[i] = obj[i];
	}
	return tempObj;
}
Flash.prototype.addAttribute = function(prop, val){ this.attributes[prop] = val; }
Flash.prototype.addParameter = function(prop, val){ this.params[prop] = val; }
Flash.prototype.addVariable = function(prop, val){ this.variables.push([prop, val]); }
Flash.prototype.getFlashVars = function(){
	var tempString = new Array();
	
	for(var i=0; i<this.variables.length; i++)
		tempString.push(this.variables[i].join("="));
		
	return tempString.join("&");
}
Flash.prototype.toString = function(){
	
	this.params.flashVars = this.getFlashVars();
	if(Browser.isIE()){
		//IE
		this.html = "<ob" + "ject";
		var attr = Flash.getObjectByExceptions(this.attributes, ["type", "data"]);
		for(var i in attr) if(i.toString() != "extend") this.html += " " + i.toString() + " = \"" + attr[i] + "\"";
		this.html += "> ";
		var params = Flash.getObjectByExceptions(this.params, ["pluginurl", "extend"]);
		for(var i in params) if(i.toString() != "extend") this.html += "<param name=\"" + i.toString() + "\" value=\"" + params[i] + "\" /> ";
		this.html += " </obj" + "ect>";
	} else {
		//non-IE
		this.html = "<!--[if !IE]> <--> <obj" + "ect";
		var attr = Flash.getObjectByExceptions(this.attributes, ["classid", "codebase"]);
		for(var i in attr) if(i.toString() != "extend") this.html += " " + i.toString() + " = \"" + attr[i] + "\"";
		this.html += "> ";
		var params = Flash.getObjectByExceptions(this.params, ["extend"]);
		for(var i in params) if(i.toString() != "extend") this.html += "<param name=\"" + i.toString() + "\" value=\"" + params[i] + "\" /> ";
		this.html += " </obj" + "ect> <!--> <![endif]-->";
	}

	return this.html;
	
}
Flash.prototype.write = Flash.prototype.outIn = Flash.prototype.writeIn = function(w){
	if(typeof w == "string" && document.getElementById) var w = document.getElementById(w);
	if( w != undefined && w ) w.innerHTML = this.toString();
	else document.write( this.toString() );
}

