    function opCourse(param, path)
        {
        if (path==0)
        {
        if(param == "ENG")
            {
           // window.open("lessons/home_en.html","course_en","");
		  
		   window.location = "lessons/home_en.html";
            }
        if(param == "POR")
            {
          //  window.open("lessons/home_pt.html","course_pt","");
			  window.location = "lessons/home_pt.html"
            }  
        if(param == "ROM")
            {
           // window.open("lessons/home_ro.html","course_ro","");
			  window.location = "lessons/home_ro.html"
            }  
        if(param == "ESP")
            {
			
         //   window.open("lessons/home_es.html","course_ro","");
			  window.location = "lessons/home_es.html"
            }                                   
		}
		else{
		if(param == "ENG")
            {
           // window.open("lessons/home_en.html","course_en","");
		  
		   window.location = "../lessons/home_en.html";
            }
        if(param == "POR")
            {
          //  window.open("lessons/home_pt.html","course_pt","");
			  window.location = "../lessons/home_pt.html"
            }  
        if(param == "ROM")
            {
           // window.open("lessons/home_ro.html","course_ro","");
			  window.location = "../lessons/home_ro.html"
            }  
        if(param == "ESP")
            {
			
         //   window.open("lessons/home_es.html","course_ro","");
			  window.location = "../lessons/home_es.html"
            }                                   
		}

		
        }

	function validate()
	{
	alert("Feature under construction!\nPlease come back soon.");
	}
		
	function questionnaire()
	{
		var topAlign = (document.body.scrollHeight)/2 - 400;
		var leftAlign = (document.body.scrollWidth)/2 - 300;
		var STRsrc = 'Questionnaire.php';
		iframeNameQuestionnaire = document.getElementById("iframeQuestionnaire");
		iframeNameQuestionnaire.src = STRsrc;
		iframeNameQuestionnaire.style.position = "absolute";
		iframeNameQuestionnaire.style.left = leftAlign;
		iframeNameQuestionnaire.style.top = topAlign;
		
		iframeNameQuestionnaire.style.width = 600;
		iframeNameQuestionnaire.style.height = 757;
		opacity('iframeQuestionnaire',0,90,1000);	
		iframeNameQuestionnaire.style.display = "none";
		iframeNameQuestionnaire.style.display = "block";
		var clickOn = true;
	}
	
	function questionnaire_pt()
	{
		var topAlign = (document.body.scrollHeight)/2 - 400;
		var leftAlign = (document.body.scrollWidth)/2 - 300;
		var STRsrc = 'Questionnaire_PT.php';
		iframeNameQuestionnaire = document.getElementById("iframeQuestionnaire");
		iframeNameQuestionnaire.src = STRsrc;
		iframeNameQuestionnaire.style.position = "absolute";
		iframeNameQuestionnaire.style.left = leftAlign;
		iframeNameQuestionnaire.style.top = topAlign;
		
		iframeNameQuestionnaire.style.width = 600;
		iframeNameQuestionnaire.style.height = 757;
		opacity('iframeQuestionnaire',0,90,1000);	
		iframeNameQuestionnaire.style.display = "none";
		iframeNameQuestionnaire.style.display = "block";
		var clickOn = true;
	}
	
	function questionnaire_es()
	{
		var topAlign = (document.body.scrollHeight)/2 - 400;
		var leftAlign = (document.body.scrollWidth)/2 - 300;
		var STRsrc = 'Questionnaire_ES.php';
		iframeNameQuestionnaire = document.getElementById("iframeQuestionnaire");
		iframeNameQuestionnaire.src = STRsrc;
		iframeNameQuestionnaire.style.position = "absolute";
		iframeNameQuestionnaire.style.left = leftAlign;
		iframeNameQuestionnaire.style.top = topAlign;
		
		iframeNameQuestionnaire.style.width = 600;
		iframeNameQuestionnaire.style.height = 757;
		opacity('iframeQuestionnaire',0,90,1000);	
		iframeNameQuestionnaire.style.display = "none";
		iframeNameQuestionnaire.style.display = "block";
		var clickOn = true;
	}
	
	function questionnaire_ro()
	{
		var topAlign = (document.body.scrollHeight)/2 - 400;
		var leftAlign = (document.body.scrollWidth)/2 - 300;
		var STRsrc = 'Questionnaire_RO.php';
		iframeNameQuestionnaire = document.getElementById("iframeQuestionnaire");
		iframeNameQuestionnaire.src = STRsrc;
		iframeNameQuestionnaire.style.position = "absolute";
		iframeNameQuestionnaire.style.left = leftAlign;
		iframeNameQuestionnaire.style.top = topAlign;
		
		iframeNameQuestionnaire.style.width = 600;
		iframeNameQuestionnaire.style.height = 757;
		opacity('iframeQuestionnaire',0,90,1000);	
		iframeNameQuestionnaire.style.display = "none";
		iframeNameQuestionnaire.style.display = "block";
		var clickOn = true;
	}
		
	function opacity(id, opacStart, opacEnd, millisec)
	{ 
		//speed for each frame 
		var speed = Math.round(millisec / 100); 
		var timer = 0; 
	
		//determine the direction for the blending, if start and end are the same nothing happens 
		if(opacStart > opacEnd)
		{ 
			for(i = opacStart; i >= opacEnd; i--) { 
				setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
				timer++; 
			} 
		} else if(opacStart < opacEnd) { 
			for(i = opacStart; i <= opacEnd; i++) 
				{ 
				setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed)); 
				timer++; 
			} 
		} 
	} 
	
	//change the opacity for different browsers 
	function changeOpac(opacity, id) 
	{ 
		var object = document.getElementById(id).style; 
		object.opacity = (opacity / 100); 
		object.MozOpacity = (opacity / 100); 
		object.KhtmlOpacity = (opacity / 100); 
		object.filter = "alpha(opacity=" + opacity + ")"; 
	}
	
	// Removes all characters which do NOT appear in string bag from string s.
	function stripCharsNotInBag (s, bag)
	{   
	var i;
    var returnString = "";

    // Search through string's characters one by one.
    // If character is in bag, append to returnString.

    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) != -1) returnString += c;
    }
    return returnString;
	}
	
	function stripCharsInBag (s, bag)

{   var i;
    var returnString = "";

    // Search through string's characters one by one.
    // If character is not in bag, append to returnString.

    for (i = 0; i < s.length; i++)
    {   
        // Check that current character isn't whitespace.
        var c = s.charAt(i);
        if (bag.indexOf(c) == -1) returnString += c;
    }

    return returnString;
}

var newwindow = '';
function popitup(url) {
if (newwindow.location && !newwindow.closed) {
    newwindow.location.href = url;
    newwindow.focus(); }
else {
    newwindow=window.open(url,'htmlname','width=404,height=316,resizable=1');}
}


