//
//=====================================================================
//  copyright Haruna Juko Mawanda
//  http://www.viewafrica.com
//=====================================================================


function PrintImageWithWH(strLocation, w, h) {
    var FirstPart = '<img border=0 src="' + strLocation;
    var LastPart = '.jpg" width="' + w + '" height="' + h + '" alt=""/>';

    sFilename = FirstPart + irand + LastPart;
    document.write(sFilename);
}
function rand(count) {
    irand = Math.ceil(Math.random() * count);
    return irand;
}

function getCalendarDate() {
    var months = new Array(13);
    months[0] = "January";
    months[1] = "February";
    months[2] = "March";
    months[3] = "April";
    months[4] = "May";
    months[5] = "June";
    months[6] = "July";
    months[7] = "August";
    months[8] = "September";
    months[9] = "October";
    months[10] = "November";
    months[11] = "December";
    var now = new Date();
    var monthnumber = now.getMonth();
    var monthname = months[monthnumber];
    var monthday = now.getDate();
    var year = now.getYear();
    if (year < 2000) { year = year + 1900; }
    var dateString = monthname.toUpperCase() +
                    ' ' + ', ' +
                    year;
    return dateString;
} // function getCalendarDate()

function getNextCalendarDate() {
    var months = new Array(13);
    months[0] = "January";
    months[1] = "February";
    months[2] = "March";
    months[3] = "April";
    months[4] = "May";
    months[5] = "June";
    months[6] = "July";
    months[7] = "August";
    months[8] = "September";
    months[9] = "October";
    months[10] = "November";
    months[11] = "December";
    var now = new Date();
    var monthnumber = now.getMonth() + 1;
    if (monthnumber > 11) { monthnumber = 0; }
    var monthname = months[monthnumber];
    var monthday = now.getDate();
    var year = now.getYear();
    if (year < 2000) { year = year + 1900; }
    var dateString = monthname.toUpperCase()
                     + ', ' +
                    year;
    return dateString;
} // function getCalendarDate()

function jumpToNew(URL_List){
    jumpToMapUrl2(URL_List.options[URL_List.selectedIndex].value, document.getElementById("cmbCountry").options[document.getElementById("cmbCountry").selectedIndex].text);
}

function jumpToMapUrl2(URL_List){
	var temp_lvl
	var URL

	if (URL_List == "X") {
		alert("Please Select a Country from the drop down menu");
		document.getElementById("cmbCountry").focus();
		
	}else{
	URL = "ccview.aspx?ccode=" + URL_List + "&cname=" + document.getElementById("cmbCountry").options[document.getElementById("cmbCountry").selectedIndex].text;
			window.location.href = URL;
	}
   
}

function jumpToMapUrl(URL_List, URL_Name) {
    
        URL = "ccview.aspx?ccode=" + URL_List + "&cname=" + URL_Name;
            window.location.href = URL;
}

