/**
 * actions.js: Javascripts for Portfolio app IM/ID @ Designskolen Kolding.
 * @author         Patrik Svensson
 * @contact   	   patrik@metervara.com
 * @version        Sun Jan 9 10:37 2005
*/

newWin=null;
controllerh=15;
function redir(){
//alert("redirect!");
document.location.href="http://idim.dk/";
}
function popWin(typ,w,h,lnk) {
	//alert(lnk);
	if (typ=='video/mpeg' || typ=='video/quicktime') {
		//alert('vid');
		h+=controllerh;
		l=300;
		t=300;
		if (screen) {
			l=screen.width/2-w/2;
			t=screen.height/2-h/2;
		}
		//if (newWin && !newWin.closed) {
			//newWin.close();
		//}
		//atr="width="+w+",height="+h+",left="+l+",top="+t;
		atr="width="+w+",height="+h+",left="+l+",top="+t+",location=0,scrollbars=0,titlebar=0,status=1,toolbar=0";
		//url="htdocs/video.html?src="+lnk+"&typ="+typ+"&w="+w+"&h="+h;
		url="phpdocs/video.php?src="+lnk+"&typ="+typ+"&w="+w+"&h="+h;
		newWin = window.open(url,"popwin",atr);
	} else {
		//alert('other');
		if (newWin && !newWin.closed) {
			newWin.close();
		}
		newWin = window.open(lnk,"popwin");
	}
}