// JavaScript Document
function Link(url) {
//	alert(url);
	if(top.document !== document) {
		return top.Link(url);
	}
	window.location = url;
	return false;
}
function LinkID(id, title) {
	if(id!=0) {
		Link("/content/" + id + "/" + u(title) + ".html");
	}
}
function LinkSubID(id, title) {
	if(id!=0) {
		Link("/subcontent/" + id + "/" + u(title) + ".html");
	}
}
function LinkSerie(serie, id, section, title) {
	if(!serie) {
		Link("/serie/");
	} else if(!id) {
		Link("/serie/" + serie + "/" + u(title) + ".html");
	} else if(id!=0) {
		if(!section) {
			Link("/serie/" + serie + "/" + id + "/" + u(title) + ".html");
		} else {
			Link("/serie/" + serie + "/" + id + "/" + u(title) + ".html?section=" + section);
		}
	} 
}
function LinkOccasion(id, section, title) {
	if(!id) {
		Link("/occasion/");
	} else if(id!=0) {
		if(!section) {
			Link("/occasion/" + id + "/" + u(title) + ".html");
		} else {
			Link("/occasion/" + id + "/" + u(title) + ".html?section=" + section);
		}
	} 
}
function LinkNieuws(cat, news, nothing, title) {
	if(!cat) {
		Link("/nieuws/");
	} else if(cat!=0) {
		if(!news) {
			Link("/nieuws/" + cat + "/" + u(title) + ".html");
		} else {
			Link("/nieuws/" + cat + "/" + news + "/" + u(title) + ".html");
		}
	} 
}
function u(t) {
	return (t+"").toLowerCase().replace(/[^a-zA-Z0-9\-]+/g, '-').replace(/[\-]+/g, '-');
}
