<!--
var isdynamic = true;
function open_link(contenttype, object, language){
	s= window.location.href;
	pages = "index.cfm?contentid=" + object + "&language=" + language ;
	document.location.href = pages;
}

function open_popup(page){
	page = page + "&rd=" + Math.random();
	window.open (page, 'adminConsole', 'left=150,top=50,width=800,height=600,scrollbars=yes,resizable=no,status=no,menubar=no,directories=no');
}
function open_popup_selector(page){
	page = page + "&rd=" + Math.random();
	window.open (page, 'adminConsoleSelector', 'left=300,top=10,width=350,height=400,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 open_fileman(page){
	page = page + "&rd=" + Math.random();
	window.open (page, 'adminPictures', 'left=200,top=10,width=800,height=690,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() {
	/*myUrl = document.location.href+"?print=1";
	if(document.location.href.indexOf('?') != -1){myUrl = document.location.href+"&print=1";}*/
   	window.open('print.cfm',"Print",'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=0,width=680,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 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();
	}

function toogleLinksDiv( szDivID, iState ){
    if(document.layers)	   //NN4+
    {
       document.layers[szDivID].visibility = iState ? "show" : "hide";
    }
    else if(document.getElementById)	  //gecko(NN6) + IE 5+
    {
        var obj = document.getElementById(szDivID);
        //obj.style.visibility = iState ? "visible" : "hidden";
		obj.style.display = iState ? "inline" : "none";
    }
    else if(document.all)	// IE 4
    {
        document.all[szDivID].style.visibility = iState ? "visible" : "hidden";
    }
}


function showDiv1(){
	toogleLinksDiv('africa_links',0);
	toogleLinksDiv('europe_links',0);
	toogleLinksDiv('middle_east_links',0);
	toogleLinksDiv('asia_links',0);
	toogleLinksDiv('americas_links',1);	
}

function showDiv2(){
	toogleLinksDiv('africa_links',0);
	toogleLinksDiv('americas_links',0);
	toogleLinksDiv('middle_east_links',0);
	toogleLinksDiv('asia_links',0);
	toogleLinksDiv('europe_links',1);
}

function showDiv3(){
	toogleLinksDiv('africa_links',0);
	toogleLinksDiv('europe_links',0);
	toogleLinksDiv('americas_links',0);
	toogleLinksDiv('asia_links',0);
	toogleLinksDiv('middle_east_links',1);
}

function showDiv4(){
	toogleLinksDiv('africa_links',0);
	toogleLinksDiv('europe_links',0);
	toogleLinksDiv('americas_links',0);
	toogleLinksDiv('middle_east_links',0);
	toogleLinksDiv('asia_links',1);
}

function showDiv5(){
	toogleLinksDiv('europe_links',0);
	toogleLinksDiv('americas_links',0);
	toogleLinksDiv('middle_east_links',0);
	toogleLinksDiv('asia_links',0);
	toogleLinksDiv('africa_links',1);
}

function showFLV(flv,title,w,h){
	//320 * 176
	var so = new SWFObject('/common/flash/mediaplayer.swf','mpl',w,h,'8');
	so.addParam('allowscriptaccess','always');
	so.addParam('allowfullscreen','true');
	//so.addVariable('width',w);
	//so.addVariable('height',h);
	so.addVariable('file',flv);
	//so.addVariable('displayheight','400');
	so.addVariable('screencolor','0xffffff');
	so.addVariable('lightcolor','0xbbbbbc');
	so.addVariable('backcolor','0xe6e6e6');
	so.addVariable('frontcolor','0x333333');
	so.addVariable('screencolor','0x000000');
	//so.addVariable('autoscroll','true');
	so.addVariable('autostart','true');
	$$('#shadowbox').setStyle('display','')
//alert($$('#curVideoTitle').get('html'));
	//$$('#curVideoTitle').set('html',title);
	so.write('previewFLV');
	document.getElementById('curVideoTitle').innerHTML = title;
}

function copyLinkToClipboard(str){
	alert('Link ('+str+') copied to clipboard.');
}

//-->


