function addBookmark(title, url)
{
    if (window.sidebar)
    {
        window.sidebar.addPanel(title, url,"");
    }
    else if(document.all)
    {
        window.external.AddFavorite(url, title);
    }
    else if(window.opera && window.print)
    {
        return true;
    }
}


// newsletter show hide

var hidden = true;
var hFullSize = 145;
var hSize = 0;
var speed = 10;
var increment1 = 8;
var increment2 = 1;
var modSpeedSize = 120;
var boxTextClic = document.getElementById('boxTextClic');

function showNewsletter()
{
	if (hidden == true)
	{
		boxTextClic.style.display = 'block';
		hidden = false;

/*
		if (hSize < hFullSize)
		{
			/* if (hSize > modSpeedSize) hSize = hSize + increment2;
			else */ /* hSize = hSize + increment1;
			//boxTextClic.style.width = 100;
			boxTextClic.style.height = hSize + "px";
			setTimeout('showNewsletter()', speed);
		}
		else
		{
			hidden = false;
		}
		*/
	}
	else
	{
		boxTextClic.style.display = 'none';
		hidden = true;
		// alert("taille : " + hsize);
//		if (hSize > 0)
//		{ 
//			/* if (hSize < (hFullSize - modSpeedSize)) hSize = hSize - increment2;
//			else */ hSize = hSize - increment1;
//			boxTextClic.style.height = hSize + "px";
//			setTimeout('showNewsletter()', speed);
//		}
//		else
//		{
//			hidden = true;
//		}
	}
}



// vérification formulaire newsletter
function verify(form)
{
   var passed = false;
var blnRetval, intAtSign, intDot, intComma, intSpace, intLastDot, intDomain, intStrLen;
if (form.Email){
			   intAtSign=form.Email.value.indexOf("@");
				intDot=form.Email.value.indexOf(".",intAtSign);
				intComma=form.Email.value.indexOf(",");
				intSpace=form.Email.value.indexOf(" ");
				intLastDot=form.Email.value.lastIndexOf(".");
				intDomain=intDot-intAtSign;
				intStrLen=form.Email.value.length;
		// *** CHECK FOR BLANK EMAIL VALUE
		   if (form.Email.value == "" )
		   {
		alert("You have not entered an email address.");
		form.Email.focus();
		passed = false;
		}
		// **** CHECK FOR THE  @ SIGN?
		else if (intAtSign == -1)
		{

		alert("Your email address is missing the \"@\".");
				form.Email.focus();
		passed = false;

		}
		// **** Check for commas ****

		else if (intComma != -1)
		{
		alert("Email address cannot contain a comma.");
		form.Email.focus();
		passed = false;
		}

		// **** Check for a space ****

		else if (intSpace != -1)
		{
		alert("Email address cannot contain spaces.");
		form.Email.focus();
		passed = false;
		}

		// **** Check for char between the @ and dot, chars between dots, and at least 1 char after the last dot ****

		else if ((intDot <= 2) || (intDomain <= 1)  || (intStrLen-(intLastDot+1) < 2))
		{
		alert("Please enter a valid Email address.\n" + form.Email.value + " is invalid.");
		form.Email.focus();
		passed = false;
		}
		else {
				passed = true;
		}
}
else    {
		passed = true;
}
return passed;
}


function setFlash(divName,divOption, tdId) {
	document.getElementById(divName).innerHTML =
'\
	<object classid="CLSID:D27CDB6E-AE6D-11cf-96B8-444553540000" width="580" height="348" id="flash_pano" codebase="http://active.macromedia.com/flash9/cabs/swflash.cab#version=9,0,28,0">\
	 	<param name="movie" value="panoStudioViewer.swf" />\
		<param name="allowScriptAccess" value="always" />\
		<param name="allowNetworking" value="all" />\
		<param name="allowFullScreen" value="true" />\
		<param name="FlashVars" value="pano=' + divOption + '" />\
		<embed src="panoStudioViewer.swf" width="580" height="348" \
			type="application/x-shockwave-flash" name="flash_pano" \
			allowScriptAccess="always" allowNetworking="all" allowFullScreen="true" \
			FlashVars="pano=' + divOption + '" \
			pluginspage="http://www.macromedia.com/go/getflashplayer" > \
		</embed>\
	</object>\
';

	for (i = 1; i <= 6; i++)
	{
		Pimg = 'PPano' + i;
		myEle = document.getElementById(Pimg);
		
		myEle.style.border='1px solid white';
		myEle.onmouseover= function() { this.style.border = '1px solid black';};
		myEle.onmouseout=function() { this.style.border = '1px solid white';};
	}

	document.getElementById(tdId).style.border='1px solid #009933';
	document.getElementById(tdId).onmouseover='';
	document.getElementById(tdId).onmouseout='';

}


