// gestion des scripts qui permettent d'ouvrir les pop-up accessible du site www.electricite-strasbourg.fr 
// Mise en place par Sendil Sinivassane MCC 16/01/2006 
// le fichier est déposé dans la base fichier

function isUndefined(v) {
    var undef;
    return v===undef;
}

var _POPUP_FEATURES = 'location=0,statusbar=0,top=20, left=20, menubar=0,width=400,height=455';
function raw_popup(url, target, features) {
    // pops up a window containing url optionally named target, optionally having features
    if (isUndefined(features)) features = _POPUP_FEATURES;
    if (isUndefined(target  )) target   = '_blank';
    var theWindow = window.open(url, target, features);
    theWindow.focus();
    return theWindow;
}
function link_popup(src) {
    // to be used in an html event handler as in: <a href="..." onclick="link_popup(this,...)" ...
    // pops up a window grabbing the url from the event source's href
    return raw_popup(src.getAttribute('href'));
}

var _POPUP_FEATURES1 = 'location=0,statusbar=0,top=20, left=20, menubar=0,width=400,height=455, scrollbars=1';
function raw_popup1(url, target, features) {
    // pops up a window containing url optionally named target, optionally having features
    if (isUndefined(features)) features = _POPUP_FEATURES1;
    if (isUndefined(target  )) target   = '_blank';
    var theWindow = window.open(url, target, features);
    theWindow.focus();
    return theWindow;
}
function link_popup1(src) {
    // to be used in an html event handler as in: <a href="..." onclick="link_popup(this,...)" ...
    // pops up a window grabbing the url from the event source's href
    return raw_popup1(src.getAttribute('href'));
}


var _POPUP_FEATURES2 = 'location=0,statusbar=1,top=50, left=50, menubar=0,width=400,height=455, scrollbars=1';
function raw_popup_services(url, target, features) {
    // pops up a window containing url optionally named target, optionally having features
    if (isUndefined(features)) features = _POPUP_FEATURES1;
    if (isUndefined(target  )) target   = '_blank';
    var theWindow = window.open(url, target, features);
    theWindow.focus();
    return theWindow;
}
function link_popup_services(src) {
    // to be used in an html event handler as in: <a href="..." onclick="link_popup(this,...)" ...
    // pops up a window grabbing the url from the event source's href
    return raw_popup_services(src.getAttribute('href'));
}


var _POPUP_FEATURES3 = 'location=0,statusbar=1,top=50, left=50, menubar=0,width=405,height=530, scrollbars=0';
function raw_popup_gestio(url, target, features) {
    // pops up a window containing url optionally named target, optionally having features
    if (isUndefined(features)) features = _POPUP_FEATURES3;
    if (isUndefined(target  )) target   = '_blank';
    var theWindow = window.open(url, target, features);
    theWindow.focus();
    return theWindow;
}
function link_popup_gestio(src) {
    // to be used in an html event handler as in: <a href="..." onclick="link_popup(this,...)" ...
    // pops up a window grabbing the url from the event source's href
    return raw_popup_gestio(src.getAttribute('href'));
}

//ouverture et fermeture des menus
function voir(d)
{
	i=eval('document.all.i'+d.id);
	if (d.style.display =='') {
		d.style.display = 'none';
	}
	else {
		d.style.display='';
	}
}

// lien menu : utilisation dans les pages nos offres les 3 marchés
function MM_jumpMenu(targ,selObj,restore){ //v3.0 
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); 
  if (restore) selObj.selectedIndex=0; 
}
