<!--Begin Pro js functions
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
// End Pro js functions -->
<!--
var isdynamic = true;
function open_link(contenttype, object, language){
	s= window.location.href;
	page = "index.cfm?contentid=" + object;
	document.location.href = page;
}

function open_popup(page){
	page = page + "&rd=" + Math.random();
	window.open (page, 'adminConsole', 'left=300,top=10,width=850,height=650,scrollbars=yes,resizable=0,status=yes,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("pro", 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("print.cfm","Print",'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=620,height=600');
    }

function printThisInitiativePage(page){
	page = page + "&rd=" + Math.random();
	window.open (page, 'adminConsole', 'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1,width=620,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 selectValue(selectbox) {
		var form = selectbox.form;
		form.criteria.value = selectbox.name;
		form.submit();
	}

	function announceEvent(form, eventname) {
		form.method.value = eventname;
		form.submit();
	}

//-->


