function cbPopup(url) {
	sx=500;
	sy=500;
	var winl = (screen.width-sx)/2;
	var wint = (screen.height-sy)/2;
	popupwindow = window.open("http://www.campuslife.de/popup_cbout.php"+url+"", "", "top="+wint+",left="+winl+", width="+sx+", height="+sy+", scrollbars=yes");
	popupwindow.focus();
}

function showHide(cat) {
if	(document.getElementById(cat).style.display == "block")
document.getElementById(cat).style.display = "none";
else
document.getElementById(cat).style.display = "block";
}

function partypopup(num) {
remote = window.open("","","top=50, left=200, width=500, height=500, toolbar=no, scrollbars=yes, menubar=no, locationbar=no");
remote.location.href = "/func/popup_event.php?&id="+num+"";
if (remote.opener == null) remote.opener = window;
//remote.opener.name="opener";
}

function detailtheater(id) {
remote = window.open("","","top=50, left=200, width=500, height=500, toolbar=no, scrollbars=yes, menubar=no, locationbar=no");
remote.location.href = "/campuslife/func/events/detail_event.php?id="+id;
if (remote.opener == null) remote.opener = window;
//remote.opener.name="opener";
}

function popup_events (img,sx,sy) {
	var winl = (screen.width-sx)/2;
	var wint = (screen.height-sy)/2;
    	image = "<a href='javascript:self.close()'><img src='"+img+"'></a>";
    	popupwin=window.open("","","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,top="+wint+",left="+winl+",width="+sx+",height="+sy+"");
    	popupwin.document.write("<html><head><title></title><link type=text/css rel=stylesheet href=/campuslife/styles/popup.css></head><body>" + image + "</body></html>");
    	popupwin.document.close();
}

function popup_url(url,sx,sy) {
		var winl = (screen.width-sx)/2;
		var wint = (screen.height-sy)/2;
	popupwindow = window.open(url, "", "top="+wint+",left="+winl+", width="+sx+", height="+sy+", scrollbars=no");
	popupwindow.focus();
}


function onLoadFunction()  {
	cb_navigate("","");
}

/*
function onLoadFunction(month,year) {
    //$(document).ready(function() {
    	//if (GBrowserIsCompatible()) {
		
    	$("#cb_calendar").load("/func/cb_calendar.php?month="+month+"&year="+year+"");
	
		//}
	//}
}
*/

// Mail
function moritz(){
  var name = "info";
  var domain = "campuslife.de";
  document.write('<a href=\"mailto:' + name + '@' + domain + '\" title="info@campuslife.de">');
  document.write(name + '@' + domain + '</a>')
}

function sbOver(text) {
	if (text == '') {
		text = '...';
	} else {
		text='&nbsp;<strong>'+text+'</strong>';
	}
	document.getElementById('sbText').innerHTML=text;
}

function sbDo(was) {
	sburl=encodeURIComponent(location.href);
	sbtitle=encodeURIComponent(document.title);
	switch(was) {		
		case 'delicious':
			window.open('http://del.icio.us/post?url='+sburl+'&title='+sbtitle);
			break;
		case 'wong':
			window.open('http://www.mister-wong.de/index.php?action=addurl&bm_url='+sburl+'&bm_description='+sbtitle);
			break;
		case 'blinkList':
			window.open('http://www.blinklist.com/index.php?Action=Blink/addblink.php&Description=&Url='+sburl+'&Title='+sbtitle);
			break;
		case 'yahoo':
			window.open('http://myweb2.search.yahoo.com/myresults/bookmarklet?u='+sburl+'&t='+sbtitle);
			break;
		case 'yigg':
			window.open('http://yigg.de/neu?exturl='+sburl+'&exttitle='+sbtitle);
			break;	
		case 'furl':
			window.open('http://www.furl.net/storeIt.jsp?u='+sburl+'&t='+sbtitle);
			break;
		case 'oneview':
			window.open('http://beta.oneview.de:80/quickadd/neu/addBookmark.jsf?URL='+sburl+'&title='+sbtitle);			
			break;
		case 'folkd':
			window.open('http://www.folkd.com/submit/page/'+sburl);
			break;
		case 'linkarena':	
			window.open('http://linkarena.com/bookmarks/addlink/?url='+sburl+'&title='+sbtitle+'&desc=&tags=');
			break;
		case 'google': 		
			window.open('http://www.google.com/bookmarks/mark?op=add&hl=de&bkmk='+sburl+'&title='+sbtitle);
			break;
		case 'webnews': 		
			window.open('http://www.webnews.de/einstellen?url='+sburl+'&title='+sbtitle);
			break;
	}
}
