function kitrouve() {
	document.location.href = "/";
}

function defaultInput(input, txt) {
	var element = $(input);
	if (element.getProperty('value') == '') {
		element.setProperty('value', txt);
	}
}

function clearInput(input, txt) {
	var element = $(input);	
	if (element.getProperty('value') == txt) {
		element.setProperty('value', '');
	}
}

function hoverButton(button, src) {
	var element = $(button);
	element.setStyle('cursor','pointer');
	element.setProperty('src', src);
}

function viewBoxNotice(txt) {
	$('box_notice').setStyle('display', 'block');
	var element = $('box_notice_txt');
	element.setHTML(txt);
	noticeSlide.slideIn();
	
	setTimeout("hideBoxNotice()", 7000);
}

function hideBoxNotice() {
	noticeSlide.slideOut();
}

function modeListe() {
	var count = countAd();
	
	for (i=1; i<count+1; i++) {
		if (etatListe == 0) {
			$('ann'+i+'_photo').setStyle('display', 'none');
			$('ann'+i+'_date').setStyle('display', 'none');
			$('ann'+i+'_info').setStyle('display', 'none');
		}
		else {
			$('ann'+i+'_photo').setStyle('display', 'inline');
			$('ann'+i+'_date').setStyle('display', 'inline');
			$('ann'+i+'_info').setStyle('display', 'inline');
		}
	}
	
	if (etatListe == 0) {
		$('modeListe').setHTML('Mode photo');
		etatListe = 1
	}
	else {
		$('modeListe').setHTML('Mode photo');
		etatListe = 0;
	}
}

function countAd() {
	var element = $('liste_annonces').getElements('div[id^=annonce]');
	
	return element.length;
}

function pageListe(idPage) {
	var count = countAd();
	
	for (i=1; i<count+1; i++) {
		$('ann'+i+'_photo').setStyle('display', 'none');
		$('ann'+i+'_date').setStyle('display', 'none');
		$('ann'+i+'_info').setStyle('display', 'none');
	}
}

function viewDetail(idAnn) {
	var elDetail  = $('ann'+idAnn+'_detail');
	var elAnnonce = $('annonce'+idAnn);
	
	if (elDetail.getStyle('display') == "none") {
		addFavoris(idAnn);
		elAnnonce.setStyle('display', 'none');
		elDetail.setStyle('display', 'block');
	}
	else {
		elDetail.setStyle('display', 'none');
		elAnnonce.setStyle('display', 'block');
	}
}

function addDetail(idAnn, idListe) {
	var url = "/consultation/detail/id/"+idAnn+"/idliste/"+idListe;
	
	new Ajax(url, {
		method: 'post',
		update: $('ann'+idAnn+'_detail'),
		onComplete: function() {
			viewDetail(idAnn);
		},
		evalScripts: true
	}).request();
}

function viewContact(id) {
	var element = $('contact'+id);
	var display = element.getStyle('display');
	
	if (display == 'none') {
		element.setStyle('display', 'block');
	}
	else {
		element.setStyle('display', 'none');
	}
}

function sendEmail(idAnn) {
	clearInput('message'+idAnn, 'Votre message');
	
	var url = '/consultation/contact/?'+$('formEmail'+idAnn).toQueryString();
	
	new Ajax(url, {
		method: 'get',
		onComplete: function() {
			viewMessageMail(idAnn);
		}
	}).request();
}

function viewMessageMail(idAnn) {
	defaultInput('message'+idAnn, 'Votre message');
	var element1 = $('td_bouton'+idAnn);
	var element2 = $('td1_bouton'+idAnn);
	
	element1.setStyle('display', 'none');
	element2.setStyle('display', 'block');
	
	setTimeout("viewMessageSend("+idAnn+");", 4000);
}

function viewMessageSend(idAnn) {
	defaultInput('message'+idAnn, 'Votre message');
	var element1 = $('td_bouton'+idAnn);
	var element2 = $('td1_bouton'+idAnn);
	
	element2.setStyle('display', 'none');
	element1.setStyle('display', 'block');
}

function changeTri() {
	var element = $('trier');
	
	if (etatTri == '') {
		etatTri = 1;
		$('order').setProperty('value', 'prix');
		startSearch();
		element.setHTML("Trier par date");
	}
	else {
		etatTri = '';
		$('order').setProperty('value', 'date_maj');
		startSearch();
		element.setHTML("Trier par prix");
	}
}

function openDepot() {
	
		if ($('depot_recapitulatif') != null) {
			$('depot_recapitulatif').remove();
		}
		
		$('liste_annonces').remove();
		
		var el  = new Element('div', {'id': 'liste_annonces'});
		el.injectInside($('content_annonce'));
		
		var url = "/depot/saisie";
		
		new Ajax(url, {
			method: 'post',
			update: $('liste_annonces'),
			evalScripts: true
		}).request();
}

function searchCity(cp) {
	var url = '/geo/codepostal/'+cp;
	
	new Ajax(url, {
		method: 'get',
		update: $('depot_ville'),
		evalScripts: false
	}).request();
}

function uploadPhoto() {
	etatDepot = 0;
	
	var photo = $('photo');
	var nbUpload = countUploaded();
	
	if (nbUpload < 5) {
		if (photo.getProperty("value").test('jpg|gif|png', 'i')) {
			uploadId++;
			clearErrorMessage('photo');
			createUploaded(uploadId);
			//submitUpload(uploadId);
			$('depot').setProperty('target', 'upload');
			document.forms["depot"].submit();
		}
		else {
			errorMessage('photo', "Type de fichier non valide.<br>Merci d'utiliser un fichier de type 'jpg', 'gif' ou 'png'");
			etatDepot = 1;
		}
	}
	else {
		errorMessage('photo', "5 photos maximum.<br/>Vous avez atteint le nombre maximum de photo.");
		etatDepot = 1;
	}
}

function submitUpload(id) {
	var td = $('tdPhoto');
	var iframe = new Element('iframe', {'src' : '', 'style' : 'width:1px;height:1px;border:0;', 'name' : 'upload'+id, 'id' : 'upload'+id}).injectInside(td);
	$('depot').setProperty('action', '/depot/uploadPhoto/');
	$('depot').setProperty('enctype', 'multipart/form-data');
	$('depot').setProperty('method', 'post');
	$('depot').setProperty('target', 'upload'+id);
	
	document.forms["depot"].submit();
	
	$('depot').removeProperty('action');
	$('depot').removeProperty('enctype');
	$('depot').removeProperty('method');
	$('depot').removeProperty('target');
}

function updatePhoto(id, src) {
	$('imgUpload'+id).setProperty('src', src);
	$('imgUpload'+id).setProperty('width', '50');
	$('hidePhoto'+id).setProperty('value', src);
	$('delPhoto'+id).setStyle('display', 'block');
	$('photo').setProperty('value', '');
	etatDepot = 1;
	
	if (submitDepot == 1) {
		submitDepot = 0;
		$('img_depot_valid').setStyle('opacity', 1);
		recapitulatifDepot();
	}
}

function errorUpload(id) {
	removeUploaded(id);
	errorMessage('photo', 'Erreur upload image')
}

function createUploaded(id) {
	var listPhoto = $('listPhoto');
	
	var el = new Element('td', {'id' : 'uploaded'+id, 'width': '70'});
	var loading = new Element('img', {'src' : '/img/loading.gif', 'id' : 'imgUpload'+id, 'width': '16'}).injectInside(el);
	var input = new Element('input', {'type' : 'hidden', 'name' : 'photo[]', 'id' : 'hidePhoto'+id}).injectInside(el);
	var div = new Element('div', {'id' : 'delPhoto'+id, 'style' : 'display:none;text-align:center;'}).setHTML('<a href="#1" onclick="removeUploaded('+id+')" class="deletePhoto">Supprimer</a>').injectInside(el);
	el.injectInside(listPhoto);

	$('idPhoto').setProperty('value', id);
}

function removeUploaded(id) {
	$('uploaded'+id).remove();
	$('upload'+id).remove();
	etatDepot = 1;
}

function countUploaded() {
	var upload = $('listPhoto').getElements('div[id^=uploaded]');
	
	return upload.length;
}

function errorMessage(id, message) {
	var element = $('erreur_'+id);
	element.setStyle('display', 'block');
	element.setHTML(message);
}

function clearErrorMessage(id) {
	$('erreur_'+id).setHTML('');
}

function recapitulatifDepot() {
	if (etatDepot != 1) {
		submitDepot = 1;
		$('img_depot_valid').setStyle('opacity', 0.5);
		errorMessage('submit', 'Merci de patienter durant le téléchargment de vos photos.');
	}
	else {
		
		var el  = new Element('div', {'id': 'depot_recapitulatif'});
		el.injectInside($('content_annonce'));
		
		var url = "/depot/recapitulatif/?"+$('depot').toQueryString();
		
		new Ajax(url, {
			method: 'post',
			update: $('depot_recapitulatif'),
			onComplete: function() {
				viewRecapitulatif();
			},
			evalScripts: true
		}).request();
	}
}

function viewRecapitulatif() {
	depotSlide.slideOut();
	$('img_depot_valid').setStyle('opacity', 1);
}

function modifDepot() {
	depotSlide.slideIn();
	$('depot_recapitulatif').remove();
}

function saveDepot() {
	
	$('liste_annonces').remove();
	
	var url = "/depot/validate/?"+$('recapitulatif').toQueryString();
	
	$('depot_recapitulatif').remove();

	var el  = new Element('div', {'id': 'liste_annonces'});
	el.injectInside($('content_annonce'));
		
	new Ajax(url, {
		method: 'post',
		update: $('liste_annonces'),
		evalScripts: true
	}).request();
}

function newPage(remove) {
	var nbPage  = pageCount++;
	var el      = new Element('div', {'id': 'contenu'+nbPage});
	var desc    = new Element('span', {'id': 'texte'+nbPage}).injectInside(el);
	el.injectInside($('liste_annonces'));

	clearInput('keywords', 'Mots-clés');
	clearInput('cp', 'Code postal');
	
	var query = $('hd_form').toQueryString();
	
	var url = "/consultation/liste/?"+query+"&page="+nbPage;
	
	defaultInput('keywords', 'Mots-clés');
	defaultInput('cp', 'Code postal');
	
	new Ajax(url, {
		method: 'get',
		update: $('texte'+nbPage),
		evalScripts: true
	}).request();
	
		
	var mySlide = new Fx.Slide('pg_suivante');
	mySlide.slideOut();
	
	setTimeout("$('pg_suivante').remove()", 2000);
}

function startScroll(nbPage) {
	if (etatListe == 1) {
		pageListe(nbPage);
	}
	
	if (nbPage > 0) {
		scroll.toElement('separ'+nbPage);
	}
}

function viewCriteresConsultation(id) {
	var url = "/consultation/criteres/"+id;
	
	new Ajax(url, {
		method: 'get',
		update: $('consultation_criteres'),
		evalScripts: false
	}).request();
}

function viewCriteresDepot(id) {
	var url = "/depot/criteres/"+id;
	
	new Ajax(url, {
		method: 'get',
		update: $('depot_criteres'),
		evalScripts: false
	}).request();
}

function getGrandeLoc() {
	var url='/geo/menuGeo';

	new Ajax(url, {
		method: 'get',
		update: $('menu_grande_ville'),
		evalScripts: false
	}).request();
}

function searchfortown(id){
	var element = $('cp');	
	element.setProperty('value', id);
	startSearch();
}

function searchforloc(id){
	updateGeo("region_id", id)
}

function startSearch() {
	pageCount = 2;	
	$('liste_annonces').remove();
	
	var el  = new Element('div', {'id': 'liste_annonces'});
	el.injectInside($('content_annonce'));
	
	if ($('depot_recapitulatif') != null) {
		$('depot_recapitulatif').remove();
	}
	
	clearInput('keywords', 'Mots-clés');
	clearInput('cp', 'Code postal');
	
	var url = "/consultation/liste/?"+$('hd_form').toQueryString();
	
	new Ajax(url, {
		method: 'post',
		update: $('liste_annonces'),
		evalScripts: true
	}).request();
	
	defaultInput('keywords', 'Mots-clés');
	defaultInput('cp', 'Code postal');
}

function viewFavoris() {
	if (favoris == 0) {
		favoris   = 1;
		pageCount = 2;
	
		$('liste_annonces').remove();
		
		var el  = new Element('div', {'id': 'liste_annonces'});
		el.injectInside($('content_annonce'));
		
		//$('liste_annonces').addClass('fd_favoris');
		
		var url = "/consultation/liste/id/"+Cookie.get("kitrouve_favoris");
		
		new Ajax(url, {
			method: 'post',
			update: $('liste_annonces'),
			evalScripts: true
		}).request();
	}
	else {
		favoris = 0;
		startSearch();
	}
}

function addFavoris(idAnn) {
	
	var favoris = Cookie.get("kitrouve_favoris");
	
	if (favoris != false) {
		var listFavoris = favoris.split('-');
		listFavoris = listFavoris.map(function(item, index) { return item * 1; });
		
		if (listFavoris.contains(idAnn)) {
			listFavoris = listFavoris.remove(idAnn);
			listFavoris = listFavoris.filter(function(item, index) { return item > 0; });
			
			if (listFavoris.length == 0) {
				favoris     = idAnn;
			}
			else {
				favoris     = idAnn+'-'+listFavoris.join('-');
			}
			
			Cookie.set('kitrouve_favoris', favoris);
		}
		else {
			var nbFavoris = listFavoris.length;
			
			if (nbFavoris == 20) {
				listFavoris = listFavoris.unset(19);
			}
			
			if (listFavoris.length == 0) {
				favoris     = idAnn;
			}
			else {
				favoris     = idAnn+'-'+listFavoris.join('-');
			}
			
			Cookie.set('kitrouve_favoris', favoris);
		}
	}
	else {
		Cookie.set('kitrouve_favoris', idAnn);
	}
}

function countFavoris() {
	var favoris = Cookie.get("kitrouve_favoris");
	if (favoris != false) {
		var listFavoris = favoris.split('-');
		$('dv_favoris').setText(listFavoris.length);
	}
	else {
		$('dv_favoris').setText(0);
	}
}

function clearCountFavoris() {
	$('dv_favoris').setText(' ');
}

Array.prototype.in_array = function (value) {
	for (var key in this) { 
		if (this[key] == value) {
			return key;
		}
	}
	return false;
}

Array.prototype.insert = function (key, value) {
	if (key >= 0) {
		var a = this.slice(), b = a.splice(key);
		a[key] = value;
		
		return a.concat(b);
	}
}

Array.prototype.unset = function (valueOrIndex) {
	var output = [];
	
	for(var key in this){
		if (key != valueOrIndex) {
			output[key] = this[key];
		}
	}
	
	return output;
}

function checkInt (data)
{
	var reg = /^[0-9]{1,}$/;
	if (reg.exec(data) != null)
	{
		return true;
	}
	else
	{
		return false;
	}
}

function viewInfo(id) {
		$('liste_annonces').remove();
	
		if ($('depot_recapitulatif') != null) {
			$('depot_recapitulatif').remove();
		}
		
		var el  = new Element('div', {'id': 'liste_annonces'});
		el.injectInside($('content_annonce'));
		
		var url = "/info/"+id;
		
		new Ajax(url, {
			method: 'post',
			update: $('liste_annonces'),
			evalScripts: true
		}).request();
}

function sendAdmMail() {
	
	var url = "/info/sendMail/?"+$('contact').toQueryString();
	
	new Ajax(url, {
		method: 'post',
		update: $('liste_annonces'),
		evalScripts: true
	}).request();
}

function meaImgExec(url,idAnn){
	var el	=	document.getElementById("MeaImg"+idAnn);
	el.src	=	url;
}

function addBookmark() {
	if (!document.all) {
		alert("Faites CTRL-D pour ajouter cette page dans vos favoris");
	}
	else {
		external.AddFavorite("http://www.kitrouve.com", "Kitrouve, tout près de chez vous");
	}
}
var Flash=new Class({
	initialize: function( Flash_src, Flash_width, Flash_height){
		this.swf_src= Flash_src;
		this.swf_width= Flash_width;
		this.swf_height= Flash_height;
		this.swf_id= 'none';
		this.swf_bgcolor= 'ffffff';
		this.swf_loop= 'true';
		this.swf_liveConnect='false';
		this.swf_adds='none';
		this.swf_reqMajorVer = '9';
		this.swf_reqMinorVer = '0';
		this.swf_reqRevision = '0';
		this.swf_noPlugHTML= "<table width='245' border='0'><tr><td width='45' height='45'><a href='http://www.macromedia.com/go/getflash/' target='_blank'><img src='/swf/flashplayer.jpg'width='45' height='45' border='0' /></a></td><td width='190'><div align='center'><p align='center'><span><a href='http://www.macromedia.com/go/getflash/' target='_blank' class='StyleFlashPlayer'>Pour profiter au mieux de nos services, téléchargez Flash Player en toute sécurité en cliquant ici</a></span></p></div></td></tr></table>";
	},
	setFlash_MajorVer:function(Flash_MajorVer){
		this.swf_reqMajorVer=Flash_MajorVer;
	},
	setFlash_MinorVer:function(Flash_MinorVer){
		this.swf_reqMinorVer=Flash_MinorVer;
	},	
	setFlash_Revision:function(Flash_Revision){
		this.swf_reqRevision=Flash_Revision;
	},
	setFlash_noPlugHTML:function(Flash_String){
		this.swf_noPlugHTML=Flash_String;
	},
	setFlash_id:function(Flash_id){
		this.swf_id= Flash_id;
	},
	setFlash_bgcolor:function(Flash_bgcolor){
		this.swf_bgcolor= Flash_bgcolor;
	},
	setFlash_loop:function(Flash_loop){
		this.swf_loop= Flash_loop;
	},
	setFlash_liveConnect:function(Flash_LiveConnect){
		this.swf_liveConnect= Flash_LiveConnect;
	},
	setFlash_adds:function(Flash_adds){
		this.swf_adds="?Adds=";
		Flash_adds=arguments;
		for (var flash_i=0; flash_i < Flash_adds.length; flash_i++){
  			this.swf_adds+=Flash_adds[flash_i];
  			if(flash_i!=Flash_adds.length-1){
  				this.swf_adds+="#";
  			}
  		}
	},
	Flash_controlVersion:function(){
		var version;
		var axo;
		var e;
		try {
			axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
			version = axo.GetVariable("$version");
		} catch (e) {
		}
		if (!version)
		{
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
				version = "WIN 6,0,21,0";
				axo.AllowScriptAccess = "always";
				version = axo.GetVariable("$version");
			} catch (e) {
			}
		}
		if (!version)
		{
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
				version = axo.GetVariable("$version");
			} catch (e) {
			}
		}
		if (!version)
		{
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
				version = "WIN 3,0,18,0";
			} catch (e) {
			}
		}
		if (!version)
		{
			try {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
				version = "WIN 2,0,0,11";
			} catch (e) {
				version = -1;
			}
		}
		return version;
	},
	Flash_getSwfVer:function(testIE, testW, testO){
		var flashVer = -1;
		if (navigator.plugins != null && navigator.plugins.length > 0) {
			if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
				var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
				var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
				var descArray = flashDescription.split(" ");
				var tempArrayMajor = descArray[2].split(".");			
				var versionMajor = tempArrayMajor[0];
				var versionMinor = tempArrayMajor[1];
				var versionRevision = descArray[3];
				if (versionRevision == "") {
					versionRevision = descArray[4];
				}
				if (versionRevision[0] == "d") {
					versionRevision = versionRevision.substring(1);
				} else if (versionRevision[0] == "r") {
					versionRevision = versionRevision.substring(1);
					if (versionRevision.indexOf("d") > 0) {
						versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
					}
				}
				var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
			}
		}
		else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
		else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
		else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
		else if ( testIE && testW && !testO ) {
			flashVer = this.Flash_controlVersion();
		}
		return flashVer;	
	},
	Flash_detectFlashVer:function(reqMajorVer, reqMinorVer, reqRevision){
		var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
		var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
		var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
		var versionStr = this.Flash_getSwfVer(isIE, isWin, isOpera);
		if (versionStr == -1 ) {
			return false;
		} else if (versionStr != 0) {
			if(isIE && isWin && !isOpera) {
				tempArray= versionStr.split(" ");
				tempString= tempArray[1];
				versionArray= tempString.split(",");
			} else {
				versionArray= versionStr.split(".");
			}
			var versionMajor= versionArray[0];
			var versionMinor= versionArray[1];
			var versionRevision= versionArray[2];
			if (versionMajor > parseFloat(reqMajorVer)) {
				return true;
			} else if (versionMajor == parseFloat(reqMajorVer)) {
				if (versionMinor > parseFloat(reqMinorVer))
					return true;
				else if (versionMinor == parseFloat(reqMinorVer)) {
					if (versionRevision >= parseFloat(reqRevision))
						return true;
				}
			}
			return false;
		}
	},
	setFlash_tag:function(){
		this.swf_tag="<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="+this.swf_reqMajorVer+","+this.swf_reqMinorVer+","+this.swf_reqRevision+",0' width='"+this.swf_width+"' height='"+this.swf_height+"' ";
		if(this.swf_id!='none'){
			this.swf_tag+="id='"+this.swf_id+"'";
		}
		this.swf_tag+=" align='middle'>";
		this.swf_tag+="<param name='allowScriptAccess' value='sameDomain'/>";
		this.swf_tag+="<param name='loop' value='"+this.swf_loop+"'/>";
  		this.swf_tag+="<param name='quality' value='best'/>";
  		this.swf_tag+="<param name='bgcolor' value='#"+this.swf_bgcolor+"'/>";
  		this.swf_tag+="<param name='movie' value='"+this.swf_src;
  		if(this.swf_adds!='none'){
  			this.swf_tag+=this.swf_adds;
  		}
  		this.swf_tag+="'/>";
 		var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
		var isMac = navigator.platform.indexOf("Mac") != -1;
		this.swf_wmode;
		if(isInternetExplorer){
			this.swf_wmode='transparent';	
		}else{
			if(isMac){
				this.swf_wmode='transparent';
			}else{
				this.swf_wmode='window';
			}
		}
    	this.swf_tag+="<param name='wmode' value='"+this.swf_wmode+"'/>";
    	this.swf_tag+="<embed src= '"+this.swf_src;
  		if(this.swf_adds!='none'){
  			this.swf_tag+=this.swf_adds;
  		}    	
    	this.swf_tag+="' ";
    	this.swf_tag+="loop='"+this.swf_loop+"' quality='best' ";
    	this.swf_tag+="bgcolor='#"+this.swf_bgcolor+"' width='"+this.swf_width+"' height='"+this.swf_height+"' ";
    	if(this.swf_id!='none'){
    		this.swf_tag+="name='"+this.swf_id+"' ";
    	}
    	this.swf_tag+="align='middle' allowscriptaccess='sameDomain' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' ";
    	this.swf_tag+="swLiveConnect="+this.swf_liveConnect;
    	this.swf_tag+="/></object>";
	},
	Flash_insertInside:function(Flash_parent){
		if(this.Flash_detectFlashVer(this.swf_reqMajorVer, this.swf_reqMinorVer, this.swf_reqRevision)){
			this.setFlash_tag();
		}else{
			this.swf_tag=this.swf_noPlugHTML;
		}
		this.swf_parent=document.getElementById(Flash_parent);
		this.swf_parent.innerHTML=this.swf_tag;
	}
});
