// vim: set tabstop=4 shiftwidth=4 foldmethod=marker :
/**
 * Do a popup window in the premium template
 * @requires basic.js
 */
popupInfo = new Object();
popupInfo.lang = 'en';
popupInfo.windows = new Array();
// {{{ - popup(htmlContent,title,windowName,width,height[,scripts])
popupInfo.popup = function (htmlContent, title, windowName, width, height)
{
	/*
	if (this.windows[windowName]) {
		this.windows[windowName].close();
	}
	*/
    if (arguments.length >= 6) {
        var scripts = arguments[5];
    } else {
        var scripts = new Array();
    }
	this.windows[windowName] = popup('', windowName, width, height, 'statusbar=no,menubar=no,toolbar=no,scrollbars=no,resizable=no,top=0');
    if (!this.windows[windowName]) { return; }
	var html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
	html += '<html>';
	html += '<head>';
	html += '<title>' + title + '</title>';
	html += '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
	html += '<link rel="shortcut icon" href="/css/m/im/com/favicon.ico" type="image/x-icon" />';
	html += '<style type="text/css" media="all"><!--';
	html += '@import url("/css/m/css/basic.css");';
	html += '@import url("/css/m/css/plaxo3.css");';
	html += '@import url("/css/m/css/plaxo_premium_popup.css");';
	html += '@import url("/css/m/css/round_rect_dark.css");';
	html += '--></style>';
    for (var idx in scripts) {
        html += '<script type="text/javascript" src="/css/m/js/'+scripts[idx]+'"></script>';
    }
	html += '</head>';
	html += '<body>';
	html += '<div class="dark_round_rect">';
	html += '<div class="drr_top"><div class="drr_top_right"></div></div>';
	html += '<div class="drr_content"><div class="drr_content_right">';
	html += '<div id="info_content">' + htmlContent + '</div>';
	html += '</div></div>';
	html += '<div class="drr_bottom"><div class="drr_bottom_left"><div class="drr_bottom_right">';
	html += '<div id="close_window"><a href="javascript:window.close();" title="Close this window"><img src="/css/m/txt/'+ this.lang + '/sp/close_window.gif" alt="Close X"/></a>';
	html += '</div></div></div>';
	html += '</body>';
	html += '</html>';

	this.windows[windowName].document.write(html);
	this.windows[windowName].document.close();
	return false;
}
// }}}

