function phpads_deliverActiveX(content)
{
	document.write(content);	
}

// ** Browser detection

var ss_detect = navigator.userAgent.toLowerCase();
var ss_OS,ss_browser,ss_total,ss_thestring;
var ss_version = 0;

if (checkIt('konqueror'))
{
	ss_browser = "Konqueror";
	ss_OS = "Linux";
}
else if (checkIt('omniweb')) ss_browser = "OmniWeb"
else if (checkIt('opera')) ss_browser = "Opera"
else if (checkIt('webtv')) ss_browser = "WebTV";
else if (checkIt('icab')) ss_browser = "iCab"
else if (checkIt('msie')) ss_browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
	ss_browser = "Netscape Navigator"
	ss_version = ss_detect.charAt(8);
}
else ss_browser = "An unknown browser";

if (!ss_version) ss_version = ss_detect.charAt(place + ss_thestring.length);

if (!ss_OS)
{
	if (checkIt('linux')) ss_OS = "Linux";
	else if (checkIt('x11')) ss_OS = "Unix";
	else if (checkIt('mac')) ss_OS = "Mac"
	else if (checkIt('win')) ss_OS = "Windows"
	else ss_OS = "an unknown operating system";
}


function checkIt(string)
{
	place = ss_detect.indexOf(string) + 1;
	ss_thestring = string;
	return place;
}




// ** Select proper stylesheets dependin on browser detected

function choosestyle()
{
if (ss_browser == "Internet Explorer")
{
	document.write('<LINK rel="stylesheet" href="/goreno/commun/stylesheets/ie.css" type="text/css">');
	document.write('<LINK rel="stylesheet" href="/goreno/commun/stylesheets/menu_ie.css" type="text/css">');
}
else if (ss_browser == "Netscape Navigator")
{
	document.write('<LINK rel="stylesheet" href="/goreno/commun/stylesheets/ns.css" type="text/css">');
	document.write('<LINK rel="stylesheet" href="/goreno/commun/stylesheets/menu_ns.css" type="text/css">');
}
else
{
	document.write('<LINK rel="stylesheet" href="/goreno/commun/stylesheets/default.css" type="text/css">');
	document.write('');
}
}



// ** bug fix for netscape ver 4
// ** reloads the window if Nav4 resized

function MM_reloadPage(init) {  
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}

MM_reloadPage(true);



// ** name the opener window
// ** place in link 'onclick'  or <script language="JavaScript">thisWindowName('gomaison');</script>

function thisWindowName(name) {  
	if (document.images)
  	self.name = name;
}


// ** Shared function for opening a pop up window
//Use: <a href="file.htm" onclick="popWin(this.href,'popupwin','530','500','center','no','no','no','no','no','no','no');return false" onfocus="this.blur()">Demande de Garantie rénovation en français</a>


var win=null;
function popWin(url,popname,w,h,pos,scrl,loc,dir,sts,mb,tbr,rsz){
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scrl+',location='+loc+',directories='+dir+',status='+sts+',menubar='+mb+',toolbar='+tbr+',resizable='+rsz+'';
	win=window.open(url,popname,settings);
}

// ** navigation Buton


function btn_back(num)
{
document.write('<form>');
document.write('<input type=button value="Retour" onClick="history.go(');
document.write(num);
document.write(');">');
document.write('</form>');
}


function btn_close()
{
document.write('<form>');
document.write('<input type=button value="Fermer" onClick="javascript:setTimeout(window.close, 100);">');
document.write('</form>');
}


/* hide Email */
function writeEmail(eName, eServer)
{
emailname = eName
emailserver = eServer

document.write("<a href='mailto:" + emailname + "@" + emailserver + "'>");
document.write(emailname + "@" + emailserver);
document.write("</a>");
}

/* hide Email */
/* to use apostrof in script use this code (&#39;) */

function writeEmailcomm(eName, eServer, name)
{
emailname = eName
emailserver = eServer
var name = "cliquez ici"
var subject = "Demande d&#39;une brochure Réno-prêt"

document.writeln("<a href='mailto:" + emailname + "@" + emailserver + "?subject=" + subject + "'>");
document.writeln(name);
document.writeln("</a>");
}

function writeEmailcommsmall(eName, eServer, name)
{
emailname = eName
emailserver = eServer
var name = "cliquez ici"
var subject = "Demande d&#39;une brochure Réno-prêt"

document.writeln("<a href='mailto:" + emailname + "@" + emailserver + "?subject=" + subject + "'><span class='sssmall'><u>");
document.writeln(name);
document.writeln("</u></span></a>");
}

/* hide Email */
function writeEmail2(eName, eServer, name)
{
emailname = eName
emailserver = eServer

document.write("<a href='mailto:" + emailname + "@" + emailserver + "'>");
document.write(name);
document.write("</a>");
}




function Homepage(){

	DocURL=document.location.href;
	protocolIndex=DocURL.indexOf("://",4);
	
	serverIndex=DocURL.indexOf("/",protocolIndex + 3);

	BeginURL=DocURL.indexOf("#",1) + 1;
	urlresult=DocURL.substring(BeginURL,serverIndex);
	if (protocolIndex - BeginURL > 7)
		urlresult=""
		
	displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);

	forbiddenChars = new RegExp("[<>\'\"]", "g");	// Global search/replace
	urlresult = urlresult.replace(forbiddenChars, "");
	displayresult = displayresult.replace(forbiddenChars, "");

	document.write('<A target=_top HREF="' + urlresult + '">' + displayresult + "</a>");
}

function IE_CorrectAlpha_PNG(){
for(i=0; i<document.images.length; i++){
img    = document.images[i];
imgExt  = img.src.substring(img.src.length-3, img.src.length);
imgExt  = imgExt.toUpperCase();
if (imgExt == "PNG"){
imgID    = (img.id) ? "id='" + img.id + "' " : "";
imgClass= (img.className) ? "class='" + img.className + "' " : "";
imgTitle= (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
imgStyle= "display:inline-block;" + img.style.cssText;
if (img.align == "left") { imgStyle = "float:left;"  + imgStyle; } else if (img.align == "right"){ imgStyle = "float:right;" + imgStyle; }
if (img.parentElement.href)   { imgStyle = "cursor:hand;" + imgStyle; }       
strNewHTML    = '<span '+imgID+imgClass+imgTitle+' style="width:'+img.width+'px; height:'+img.height+'px;'+imgStyle+';'+'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\''+img.src+'\', sizingMethod=\'scale\');"></span>';
img.outerHTML = strNewHTML;
i = i-1;
}}}

if (window.addEventListener) {  //DOM method for binding an event
	window.addEventListener("load", IE_CorrectAlpha_PNG, false);
}else if (window.attachEvent){   //IE exclusive method for binding an event
	window.attachEvent("onload", IE_CorrectAlpha_PNG);
}else if (document.getElementById){  //support older modern browsers
	window.onload=IE_CorrectAlpha_PNG;
} 
