// Centrer popup
function winBRopen(theURL, Name, popW, popH, scroll) 
{
	var winleft = (screen.width - popW) / 2;
	var winUp = (screen.height - popH) / 2;
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+'',toolbar='yes';
	Win = window.open(theURL, Name, winProp);
	
	if (parseInt(navigator.appVersion) >= 4) 
	{ 
		Win.window.focus(); 
	}
}

//form style admin: cc0000/777777
function focusstyler(changethis)
{
	document.getElementById(changethis).style.borderStyle ='solid';
	document.getElementById(changethis).style.borderWidth ='1px';
	document.getElementById(changethis).style.backgroundColor ='#f2f2f2';
}
function blurstyler(changethis)
{
	document.getElementById(changethis).style.borderStyle ='dotted';
	document.getElementById(changethis).style.borderWidth ='1px';
	document.getElementById(changethis).style.backgroundColor ='#ffffff';
}

//admin set headline
function setheadline(text)
{
	document.getElementById('headline').innerHTML = text;
}

//submit only once
function submitonce(theform)
{
	//if IE 4+ or NS 6+
	if (document.all||document.getElementById)
	{
		//screen thru every element in the form, and hunt down "submit" and "reset"
		for (i=0;i<theform.length;i++)
		{
		var tempobj=theform.elements[i]
		if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
		//disable em
		tempobj.disabled=true
		}
	}
}

//Image field on/off
offon=true;
function onoff(check)
{
	offon=!offon;
	check.form.upfil.disabled=offon;
}

/*
//browser test
if ( window.navigator.userAgent.indexOf("MSIE")>=0 )
{
  var ie = true;
}
else
{
  var ie = false;
}

//flyt iframe hvis ie
window.onscroll = function(e)
{
        if (document.documentElement && typeof document.documentElement.scrollTop == "number")
		{
                elm = document.getElementById("divorderlist");
                if (elm.style.position != "fixed")
				{
                elm.style.top = document.documentElement.scrollTop+"px";
                }
        }
}
*/

