function popup(userid)
{
var w=150;
var h=300;
var myname="Info";
var mypage="http://www.multiformat.nu/test/info.php?getid="+userid;
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;

// OBS! ingen radbrytning i texten nedan
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
//slut på område utan radbrytning

win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }

}

function popupPm(userid)
{
var w=400;
var h=300;
var myname="PM";
var mypage="http://www.multiformat.nu/test/pm.php?r="+userid;
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;

// OBS! ingen radbrytning i texten nedan
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
//slut på område utan radbrytning

win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }

}

function makePublic(what,id)
{
	string="Vill du publicera "+what+"?";
	if(confirm(string))
	{
	location.href="public.php?id="+id;
	}	
}

function deleteSafe(what,id)
{
	string="Vill du ta bort "+what+"?";
	if(confirm(string))
	{
	location.href="delete.php?id="+id;
	}	
}

function deleteSafeForum(what,id)
{
	string="Vill du ta bort "+what+"?";
	if(confirm(string))
	{
	location.href="deletef.php?id="+id;
	}	
}


function deletecomment(linkid,id)
{
	string="Ta bort kommentar?";
	if(confirm(string))
	{
	location.href="delete.php?id="+id+"&lid="+linkid;
	}	
}
function deletepost(linkid,id)
{
	string="Ta bort skiten?";
	if(confirm(string))
	{
	location.href="delete.php?id="+id+"&lid="+linkid+"&x=b";
	}	
}

function test(){
//var conEl = document.getElementById('commentwriter'); 
//conEl.style.marginTop="1400px";
}

function fix()
{
icon('article');
icon('blogg');
icon('comic');
icon('guide');
icon('retro');
icon('article');
icon('blogg');
icon('comic');
icon('guide');
icon('retro');
	
}
function icon(whut)
{

	what=whut+"box";
	if(navigator.appName=="Microsoft Internet Explorer")
	{
		if(window.document.getElementById(whut).checked==true)
		{
		window.document.getElementById(whut).checked=false;	
		}
		else
		{
		window.document.getElementById(whut).checked=true;	
		}

	}

	if(window.document.getElementById(whut).checked==true)
	{
	temp = "icon/"+whut+".png";
	window.document.getElementById(what).innerHTML="<img src="+temp+" class=icon />";
	}
	else
	{
	temp = "icon/"+whut+"2.png";
	window.document.getElementById(what).innerHTML="<img src="+temp+" class=icon />";		
	}
}


function tryToDelete(){
	
	if(confirm(unescape("%C4")+"r du s"+unescape("%E4")+"ker? "+unescape("%C4")+"r du riktigt s"+unescape("%E4")+"ker?"))
	{
		if(confirm("Vill du verkligen l"+unescape("%E4")+"mna oss??"))
		{
			if(confirm("Tycker du om oss?"))
			{
				if(confirm("Varf"+unescape("%F6")+"r vill du l"+unescape("%E4")+"mna oss d"+unescape("%E5")+"??"))
				{
					if(confirm("Du "+unescape("%E4")+"r en ond m"+unescape("%E4")+"nniska, vi vill inte ha dig h"+unescape("%E4")+"r i alla fall..."))
					{
						if(confirm("....."))
						{
							if(confirm("Du f"+unescape("%E5")+"r l"+unescape("%E4")+"mna oss om du vill... Men vi kommer bjuda p"+unescape("%E5")+" t"+unescape("%E5")+"rta s"+unescape("%E5")+" sm"+unescape("%E5")+"ningom..."))
							{
								if(confirm("Det "+unescape("%E4")+"r sant... T"+unescape("%E5")+"rta, som "+unescape("%E4")+"r s"+unescape("%E5")+" gott!"))
								{
									if(confirm("Okej, okej, vi har ingen t"+unescape("%E5")+"rta. Men vi har massor utav hemligheter vi t"+unescape("%E4")+"nkt avsl"+unescape("%F6")+"ja snart."))
									{
										if(confirm("Ta inte del av v"+unescape("%E5")+"ra hemligheter d"+unescape("%E5")+". Ta bort ditt j"+unescape("%E4")+"vla konto d"+unescape("%E5")+"!"))
										{
											location.href="index.php?p=da";
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}



}
