
if (parent.frames.length > 0) { parent.location.href = self.document.location }



function OpenWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


function adjust_popup() 
{
	var w, h, fixedW, fixedH, diffW, diffH;
	
	if (document.all) {
		fixedW = document.body.clientWidth;
		fixedH = document.body.clientHeight;
		window.resizeTo(fixedW, fixedH);
		diffW = fixedW - document.body.clientWidth;
		diffH = fixedH - document.body.clientHeight;
	} else {
		fixedW = window.innerWidth;
		fixedH = window.innerHeight;
		window.resizeTo(fixedW, fixedH);
		diffW = fixedW - window.innerWidth;
		diffH = fixedH - window.innerHeight;
	}
	w = fixedW + diffW;
	h = fixedH + diffH;
	if (h >= screen.availHeight) w += 16;
	if (w >= screen.availWidth)  h += 16;
	w = Math.min(w,screen.availWidth);
	h = Math.min(h,screen.availHeight);
	window.resizeTo(w,h);
	window.moveTo((screen.availWidth-w)/2, (screen.availHeight-h)/2);
}

// ===============RESIZE on class=imgcode==========================


function resizeImg() {
	
	var _resizeWidth = 700;
	var ResizeMsg = 'This image is to wide, the poster should edit the image and set the width to 650 !!';
 
	var imgArray = document.getElementsByTagName( 'img' );
	
	for(var i = 0; i < imgArray.length; i++) {
		var imgObj = imgArray[i];


		if(imgObj.className != "banner" && imgObj.className != "news") {

			if (imgObj.width> _resizeWidth) {

				imgObj.style.width = _resizeWidth + 'px';
				factor = imgObj.height * (_resizeWidth / imgObj.width);
				imgObj.style.height = factor + 'px';
				imgObj.style.border = "2px dotted red";
				imgObj.style.cursor = "pointer";
				imgObj.style.padding = "2px";	
				imgObj.onclick = ImagecodeWinOpen;
				imgObj.title = ResizeMsg;
			}
		}
	}
}

function ImagecodeWinOpen(e) {

	var img = (e)?e.target.src:window.event.srcElement.src;
	
	var w = window.open('','DJResource - Image in original size','titlebar,scrollbars,resizable=no,location=no, menubar=no,status=no');
	if (w) {
	w.document.write('<div align="center"><img src="'+img+'"><br /><a href="#" onClick="window.close(); return false">Close</a></div>')
	w.document.close();
} else alert('Please enable popups') }

window.onload = resizeImg;


// =============================================================================
 

// Multi checkboxen op pagina

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function flevToggleCheckboxes() { // v1.1
	// Copyright 2002, Marja Ribbers-de Vroed, FlevOOware (www.flevooware.nl/dreamweaver/)
	var sF = arguments[0], bT = arguments[1], bC = arguments[2], oF = MM_findObj(sF);
    for (var i=0; i<oF.length; i++) {
		if (oF[i].type == "checkbox") {if (bT) {oF[i].checked = !oF[i].checked;} else {oF[i].checked = bC;}}} 
}


