function alertWindow(text) {

	var prntDiv = (arguments.length==1)?"locations-block":arguments[1];

	$('alertWindowInnText').innerHTML = text;
    $('alertWindow').style.display = 'block';
	$('alertWindow').style.top = parseInt(($(prntDiv).offsetHeight-parseInt($('alertWindow').offsetHeight))/2)+'px';
	$('alertWindow').style.left = parseInt(($(prntDiv).offsetWidth-parseInt($('alertWindow').offsetWidth))/2)+'px';
	$('popupWin').style.display = 'block';
    $('popupWin').style["opacity"] = parseFloat(80/100.0);
    $('popupWin').style["-moz-opacity"] = parseFloat(80/100.0);
    $('popupWin').style["-html-opacity"] = parseFloat(80/100.0);
    $('popupWin').style["filter"] = "alpha(Opacity="+80+")";

	return false;
}

function alert_close() {
	$('alertWindow').style.display = 'none';
	$('popupWin').style.display = 'none';
}

function popup(mylink, windowname) {
	var width = (arguments.length==2)?800:arguments[2];
	var height = (arguments.length==2)?600:arguments[3];
    if (! window.focus)return true;
    var href;
    if (typeof(mylink) == 'string')
        href=mylink;
    else
        href=mylink.href;
    window.open(href, 'video', 'width='+width+',height='+height+',scrollbars=yes');
    return false;
}
