function showArticle(id, par, src) {
	lightbox('/widgets/custom/article.php?i='+id+'&p='+par+'&t='+src, 700, 'html');
}
function showFromUserTable(id, src, w) {
	if(w==undefined)	w=700;
	lightbox('/widgets/incl/userTable.php?i='+id+'&t='+src, w, 'html');
}
function setHoroscope(bday,signID, df, full) {	
	$('horoscopeWidgetData').innerHTML=load('/widgets/custom/horoscope.php?nohead&bday='+bday+'&sign='+signID+'&df='+df); 
}
function showHoroscope(sign) {
	lightbox('/widgets/custom/horoscope.php?full=1&sign='+sign,300, 'html');
}
function showEventDetails(eID) {
	var xml = unescape(load('/boss/browse.php?fetch=row&v=public_events&i='+eID));
	var dv = document.createElement('div');
	dv.className = 'article';
	dv.innerHTML = '<h1>'+ParseXML(xml, Array('subj'))+'</h1>'
				+'<h2>'+ParseXML(xml, Array('Date'))+'<br><small><em>'+ ParseXML(xml, Array('duration'))+'</em></small></h2>'
				+'<div class="articleBody">'+ParseXML(xml, Array('body'))+'</div>';
	lightbox(dv, false, 'obj');
}


function loadMore(par, src, start, lim, where) {
	if(par==false)	// user file
		var html = load('/widgets/incl/userTable.php?t='+src+'&lim='+lim+'&beg='+start+'&w='+where);
	else	var html = load('/widgets/db.php?p='+par+'&t='+src+'&lim='+lim+'&beg='+start+'&w='+where);
}

/* themes */
var colorThemeHigh, colorThemeCSS;
function chooseColorTheme(theme) {
	var high = $('colorTheme|'+theme);
	if(colorThemeHigh && colorThemeHigh.className)
		colorThemeHigh.className = '';
	if(themeCSS)	colorThemeCSS.parentNode.removeChild(colorThemeCSS);

	if(theme) {
		colorThemeCSS  = loadCSS('colors/'+theme+'.css');
	} else { /* blank */
		colorThemeCSS  = loadCSS('colors/none.css');
	}
	colorThemeHigh = high;
	colorThemeHigh.className = 'high';
}
function chooseTheme(theme) {
	var high = $(theme);
	if(themeHigh && themeHigh.className)	themeHigh.className = '';
	if(themeCSS)	themeCSS.parentNode.removeChild(themeCSS);

	if(theme) {
		document.body.style.background='#000 url(/images/themes/bg/'+theme+'.jpg) no-repeat top center';
		themeCSS  = loadCSS('themes/'+theme+'.css');
	} else { /* blank */
		document.body.style.background='#edece2 url(/)';
		high = $('blank');
		themeCSS = false;
	}
	themeHigh = high;
	themeHigh.className = 'high';
}
var themeHigh, themeCSS;

/* signs */
var signCSS;
function chooseSign(sign) {
	if(signCSS)	signCSS.parentNode.removeChild(signCSS);

	if(sign) {
		signCSS  = loadCSS('signs/'+sign+'.css');
		load('/boss/boss.php?fn=setSign&sign='+sign);
	} else { /* blank */
		signCSS = false;
	}
}
