function CreateBookmarkLink()
{
	var title = document.title;
	var url = location.href;
	if (title == '')
	title = "Maroc Prestige Immo";
	if (url == '')
	url = "www.maroc-prestige-immo.com";
	if (window.sidebar)
	{ 
		// Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} 
	else if( window.external )
	{
		// IE Favorite
		window.external.AddFavorite(url, title);
	}
	else if(window.opera && window.print)
	{
		// Opera Hotlist
		return true;
	}
}

function doThis(id1,image_file,id2,text,id3,id4)
{
	document.getElementById(id1).src=image_file;
	document.getElementById(id2).value=text;
	if(document.getElementById(id3).style.display="none") document.getElementById(id3).style.display="block";;
	if(document.getElementById(id4).style.display="block") document.getElementById(id4).style.display="none";;
}
function switchLayers(id1,id2,id3,image,newwidth)
{
	if(document.getElementById(id1).style.display="block") document.getElementById(id1).style.display="none";
	document.getElementById(id2).style.display="block";
	document.getElementById(id3).src=image;
	document.getElementById(id3).width=newwidth;
}


/*with lightbox*/
function doThis2(id1,image_file,id2,text,id3,id4,id5,id6)
{
	document.getElementById(id1).src=image_file;
	document.getElementById(id2).value=text;
	document.getElementById(id3).style.display='block';
	document.getElementById(id4).style.display='none';
	document.getElementById(id5).style.display='none';
	document.getElementById(id6).style.display='block';
}


var Timer;
var Pas = 3;
function moveLayer(Sens,contenu,support) {
	Objet=document.getElementById(contenu);
    if(parseInt(Objet.style.top) + (Pas*Sens)>0)  {
		clearTimeout(Timer);
	}
	else if(parseInt(Objet.style.top) + (Pas*Sens)<-(Objet.offsetHeight-document.getElementById(support).offsetHeight)) {
		clearTimeout(Timer);
	}
    else {
        Objet.style.top = (parseInt(Objet.style.top) + (Pas*Sens)) + "px";
	}
	Timer = setTimeout("moveLayer(" + Sens + ",'" + contenu + "','" + support + "');", 30);
}

//script hidden
function showFirstHideOthers()
{
	document.getElementById(arguments[0]).style.display='block';
	for(var i=1; i<arguments.length;i++)
	{
		if(document.getElementById(arguments[i])) document.getElementById(arguments[i]).style.display='none';
	}
	return false;
}
function show(id)
{
	document.getElementById(id).style.display='block';
	return false;
}
function hideFirstShowOthers()
{
	document.getElementById(arguments[0]).style.display='none';
	for(var i=1; i<arguments.length;i++)
	{
		document.getElementById(arguments[i]).style.display='block';
	}
	return false;
}
function hide(id)
{
	document.getElementById(id).style.display='none';
	return false;
}