<!--
var isdynamic = true;
function open_link(contenttype, object, language, pageno){
	s= window.location.href;
	if (isdynamic) {
		page = "index.cfm?contentid=" + object + "&language=" + language;
		if (pageno != null) { page = page + "&pageno=" + pageno; }
		page = page + "&rd=" + Math.random();
	} else {
		page = "/" + language + "/" + object + '.html'
	}
	document.location.href = page;
}

function open_popup(page){
	page = page + "&rd=" + Math.random();
	window.open (page, 'adminConsole', 'left=300,top=10,width=700,height=650,scrollbars=yes,resizable=0,status=no,menubar=no,directories=np');
}

function open_popup2(page,l,h){
	window.open (page, 'pop', 'left=200,top=20,width='+l+',height='+h+',scrollbars=yes,resizable=0,status=no,menubar=no,directories=np');
}

function open_pictman(page){
	page = page + "&rd=" + Math.random();
	window.open (page, 'adminPictures', 'left=300,top=10,width=650,height=450,scrollbars=no,resizable=0,status=yes,menubar=no,directories=np');
}

function gotoAnchor(anchorname) {
	document.location.hash = anchorname;
	void(0);
}
function confirm_action (page){
	if (confirm("Are you sure you want to do this ?")) {
		page = page + "&rd=" + Math.random();
		open_popup (page, 'adminConsole', 'left=300,top=10,width=700,height=300,scrollbars=yes,resizable=1,status=no,menubar=no,directories=np');
		return false;}
	else {
		return false;
	}
}

function setCookie(name, value, expire) 
{   
    document.cookie = name + "=" + escape(value)   + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()));
}

function saveLanguage(name) 
{
    var today = new Date();
    var expires = new Date();
    expires.setFullYear(today.getFullYear() + 1);
    setCookie("somfy", name, expires);
}


function getCookie(Name)
{
    var search = Name + "=";
    if (document.cookie.length > 0)
    { // if there are any cookies
        offset = document.cookie.indexOf(search);
        if (offset != -1)
        { // if cookie exists
            offset += search.length;
            // set index of beginning of value
            end = document.cookie.indexOf(";", offset);
            // set index of end of cookie value
            if (end == -1)
            {
                end = document.cookie.length;
            }
	    return unescape(document.cookie.substring(offset, end));
	}
    }
}


function popUp(url)
{ 
    sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=1,width=500,height=450');
    self.name = "mainWin";
}


var da = (document.all) ? 1 : 0;
var pr = (window.print) ? 1 : 0;
var mac = (navigator.userAgent.indexOf("Mac") != -1);

function printThisPage() {
   	window.open(document.location.href+"&print=1","Print",'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=0,width=600,height=600');
    }
	
function printThisPage2() {
   	window.open(document.location.href+"&print=1","Print",'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=0,width=650,height=600');
    }	
	
function printThis() {
  if (pr) { // NS4, IE5
    window.print();
  } else if (da && !mac) { // IE4 (Windows)
    vbPrintPage();
  } else { // other browsers
    alert("Sorry, your browser doesn't support this feature.");
  }
}



	function pictPopup(img,w,h,title) 
	{
		if('undefined'.indexOf(title) == 0){
			titre="SOMFY";
		}else{
			titre="SOMFY : "+title;
		}
		if('undefined'.indexOf(w) == 0){
			tw="100";
		}else{
			tw=w;
		}
		if('undefined'.indexOf(h) == 0){
			th="100";
		}else{
			th=h;
		}
		// window.moveTo((screen.width-w)/2,(screen.height-h)/2) ;
		w=open('','image','width='+tw+',height='+th+',toolbar=no,scrollbars=no,resizable=yes');
		w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
		w.document.write("<SCRIPT language=javascript>function checksize()  { var w = document.images[0].width + 12 ; var h = document.images[0].height + 30 ; if (document.images[0].complete) {  window.resizeTo(w,h) ;  window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>");
		w.document.write("<BODY onload='checksize()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
		w.document.write("");
		w.document.write("</BODY></HTML>");
		w.document.close();
	}
	
	function pictPopupSB(img,w,h,title) 
	{
		if('undefined'.indexOf(title) == 0){
			titre="SOMFY";
		}else{
			titre="SOMFY : "+title;
		}
		if('undefined'.indexOf(w) == 0){
			tw="100";
		}else{
			tw=w;
		}
		if('undefined'.indexOf(h) == 0){
			th="100";
		}else{
			th=h;
		}
		// window.moveTo((screen.width-w)/2,(screen.height-h)/2) ;
		w=open('','image','width='+tw+',height='+th+',toolbar=no,scrollbars=yes,resizable=yes');
		w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
		//w.document.write("<SCRIPT language=javascript>function checksize()  { var w = document.images[0].width + 12 ; var h = document.images[0].height + 30 ; if (document.images[0].complete) {  window.resizeTo(w,h) ;  window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>");
		w.document.write("<BODY  leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><IMG src='"+img+"' border=0>");
		w.document.write("");
		w.document.write("</BODY></HTML>");
		w.document.close();
	}
	
	function pictLinkedPopup(img,w,h,title,url) 
	{
		if('undefined'.indexOf(title) == 0){
			titre="SOMFY";
		}else{
			titre="SOMFY : "+title;
		}
		if('undefined'.indexOf(w) == 0){
			tw="100";
		}else{
			tw=w;
		}
		if('undefined'.indexOf(h) == 0){
			th="100";
		}else{
			th=h;
		}
		// window.moveTo((screen.width-w)/2,(screen.height-h)/2) ;
		w=open('','image','width='+tw+',height='+th+',toolbar=no,scrollbars=no,resizable=no');
		w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
		w.document.write("<SCRIPT language=javascript>function checksize()  { var w = document.images[0].width + 12 ; var h = document.images[0].height + 30 ; if (document.images[0].complete) {  window.resizeTo(w,h) ;  window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>");
		w.document.write("<BODY  leftMargin=0 topMargin=0 marginwidth=0 marginheight=0><a href='javascript:window.close();' onclick=\"top.opener.document.location = '"+url+"';\"><IMG src='"+img+"' border=0></a>");
		w.document.write("");
		w.document.write("</BODY></HTML>");
		w.document.close();
	}

	function SWFPopup(swf,w,h,title) 
	{
		if('undefined'.indexOf(title) == 0){
			titre="SOMFY";
		}else{
			titre="SOMFY : "+title;
		}
		if('undefined'.indexOf(w) == 0){
			tw="100";
		}else{
			tw=w;
		}
		if('undefined'.indexOf(h) == 0){
			th="100";
		}else{
			th=h;
		}
		tw2 = new Number(tw) + 20;
		th2 = new Number(th) + 20;
		// window.moveTo((screen.width-w)/2,(screen.height-h)/2) ;
		w=open('','image','width='+tw2+',height='+th2+',toolbar=no,scrollbars=no,resizable=yes');
		w.document.write('<HTML><HEAD><TITLE>'+titre+'</TITLE></HEAD>');
		//w.document.write("<SCRIPT language=javascript>function checksize()  { var w = document.images[0].width + 12 ; var h = document.images[0].height + 30 ; if (document.images[0].complete) {  window.resizeTo(w,h) ;  window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>");
		w.document.write('<BODY  leftMargin=10 topMargin=10 marginwidth=0 marginheight=0><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="'+tw+'" height="'+th+'"><param name="movie" value="'+swf+'" /><param name="quality" value="high" /><embed src="'+swf+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" type="application/x-shockwave-flash" width="'+tw+'" height="'+th+'"></embed></object>');
		w.document.write('</BODY></HTML>');
		w.document.close();
	}
	
//-->



