function openCald2Popup(psPath, psPopuptype) {
	var sFilename;
	var iWidth = 600;
	var iHeight = 500;
	
	switch(psPopuptype) {
		case 'uk':
		case 'us':
			sFilename = "AudioRecordings";
			iWidth = 565;
			iHeight = 125;
			break;
		case 'vending':
			sFilename = "VerbEndings";
        	iWidth = 575;
			iHeight = 485;
			break;
		case 'cle':
			sFilename = "CLE";
			break;
		case 'ee':
			sFilename = "ExtraExamples";
        	iWidth = 570;
			iHeight = 390;
			break;
		case 'st':
			sFilename = "SmartThesaurus";
			iWidth = 725;
			iHeight = 605;
			break;
		case 'collo':
			sFilename = "Collocations";
			iWidth = 570;
			iHeight = 630;
			break;
		case 'wordbuild':
			sFilename = "WordBuilding";
            iWidth = 565;
			iHeight = 445;
			break;
		case 'picref':
			sFilename = "Pictures";
			iWidth = 752;
			iHeight = 730;
			break;
		case 'pdf':
			sFilename = "StudyPages";
			iWidth = 580;
			iHeight = 115;
			break;
		case 'ar':
			sFilename = "PronunciationPractice";
            iWidth = 565;
	        iHeight = 420;
			break;
	}

	var sUrl = psPath + "/popup/" + sFilename + ".html";
	var sOption = "width=" + iWidth + ",height=" + iHeight + ",resizable=yes";
	window.open(sUrl, "cdopopup", String(sOption));
}

function displayCald2Phonetics(pbShowPron) {
    var aOldParams, aNewParams, aValues;
    var sSearch, sLocation;
    var sKey, sValue, sSearch, sAnchor;
    var i;

    sSearch    = document.location.search;
    sAnchor    = document.location.hash;
    sLocation  = String(document.location).replace(sSearch, "").replace(sAnchor, "");
    sSearch    = (sSearch.length ? sSearch.substring(1) : "");
    aOldParams = sSearch.split("&");
    aNewParams = new Array();
    sSearch    = "";

    //get all parameters
    for (i=0; i<aOldParams.length; i++) {
        if (!aOldParams[i].length)
            continue;
        aValues = aOldParams[i].split("=");
        aNewParams[aValues[0]] = aValues[1];
    }

    aNewParams["showPron"] = (pbShowPron ? 1 : 0);

    for (var sKey in aNewParams)
       sSearch += (sSearch.length ? "&" : "?")  + sKey + "=" + aNewParams[sKey];
    document.location = sLocation + sSearch + sAnchor;
}
