﻿function WhoIsWho(id, type, scheme)
{
    if(type == 0)
    {
        WhoIsWhoStaff(id, scheme);
    }
    else
    {
        //WhoIsWhoStudent(id);
    }
}
function WhoIsWhoStaff(id, scheme)
{
    if(id != '')
    {
	    var w       = screen.width;
	    var h       = screen.height;
	    var popW    = 800; 
	    var popH    = 400;
	    var leftPos = (w - popW)/2, topPos = (h - popH)/2;

	    var hwnd;	
	    
	    var url = '';
	    
	    if(scheme.toUpperCase() == 'HTTP')
	    {
	        url = 'http://apps.sis.root.ehl.ch/whoswho/ehlstaff/detail.asp?ID=' + id + '&ACT=WINDOW';
	    }
	    else if(scheme.toUpperCase() == 'HTTPS')
	    {
	        'https://sis.ehl.ch/apps_sis/whoswho/ehlstaff/detail.asp?ID=' + id + '&ACT=WINDOW';
	    }
	    else
	    {
	        'https://sis.ehl.ch/apps_sis/whoswho/ehlstaff/detail.asp?ID=' + id + '&ACT=WINDOW';
	    }

	    hwnd = window.open(url, "WhoIsWho",'toolbar=no, status=no, scrollbars=yes, location=no, menubar=no, directories=no, resizable=yes, width='+ popW +', height='+ popH + ", left=" + leftPos + ", top=" + topPos);	

	    hwnd.focus();			
	}
}
function WhoIsWhoStudent(id)
{
    if(id != '')
    {
	    var w = screen.width;
	    var h = screen.height;
	    var popW = 800; 
	    var popH = 600;
	    var leftPos = (w - popW)/2, topPos = (h - popH)/2;

	    var hwnd;	
    	
	    var url = 'http://sis.ehl.ch/apps_sis/whoswho/EhlStudent/detail.asp?ID=' + id + '&ACT=';

	    hwnd = window.open(url, "WhoIsWho",'toolbar=no, status=no, scrollbars=yes, location=no, menubar=no, directories=no, resizable=yes, width='+ popW +', height='+ popH + ", left=" + leftPos + ", top=" + topPos);	

	    hwnd.focus();			
	}
}
function PopUpLabel(IdLanguage, IDLABEL, url)
{
    var w       = screen.width;
    var h       = screen.height;
    var popW    = 600; 
    var popH    = 800;
    var leftPos = (w - popW)/2, topPos = (h - popH)/2;

    var hwnd;	
	
    var url     = url + 'Admin/Label.aspx?Langue=' + IdLanguage + "&IDLABEL=" + IDLABEL + "&paramdisplaymenu=0";

    hwnd        = window.open(url, "LABELS",'toolbar=no, status=no, scrollbars=yes, location=no, menubar=no, directories=no, resizable=yes, width='+ popW +', height='+ popH + ", left=" + leftPos + ", top=" + topPos);	

    hwnd.focus();
}