function showphoto(photoname) {
	window.open('popup_photo.asp?image='+photoname, 'showphoto', 'width=224, height=200, location=no, menubar=no, scrollbars=no, resizable=yes, status=no, toolbar=no');
	return;
}
function popupWindow(lngItemId) {
	window.open('http://www.sourze.se/alert.asp?ItemId=' + lngItemId,'alertwindow','width=350,height=250,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=40,left=40');
}

function alertWindow(strMessage) {
	window.open('http://www.sourze.se/alert.asp?message=' + escape(strMessage),'alertwindow','width=350,height=170,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=40,left=40');
}

	//Chris popup-funktion
	var popp = "";
		
	function OpenPopUp(x,y,scroll,text){
		if(!popp || popp.closed){
			popp = window.open(text, "popup", "menubar=no,scrollbars=" + scroll + ",width=" + x + ",height=" + y +",status=no");
		}
		else
		{
			popp.focus()
		}
	}

//Checks if client allows cookies
function CookieCheck() 
{
	if(document.cookie == '')
	{
		if(confirm('Din browser måste tillåta cookies för att kunna använda denna sajt till fullo, vill du se hur du aktiverar din cookie-funktion?'))
		{
			if(document.all)
			{
				window.open('http://support.microsoft.com/support/kb/articles/Q196/9/55.ASP','_new')
			}
			else
			{
				window.open('http://www.netscape.com','_new')
			}
		}
	}
}
function printWindow(articleID)
{
window.open('/templates/article/printpage.asp?itemid=' + articleID,'printWindow','width=550,height=550,toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=no,top=40,left=40')
}
function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
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 openChatHighlight(artid,postid,threadid)
{
	var u = "/chat/window.asp?art="+artid;
	var n = "chat"+artid;
	if( postid )
	{
		u += "&highlight="+postid;
		n += "_p"+postid;
	}
	if( threadid )
	{
		u += "&thread="+threadid;
		n += "_t"+threadid;
	}
	var w = window.open( u, n, "WIDTH=550,HEIGHT=450,RESIZABLE=1" );
	w.focus();
}


function openChat(artid,threadid,postid)
{
	var u = "/chat/window.asp?art="+artid;
	var n = "chat"+artid;
	if( threadid )
	{
		u += "&thread="+threadid;
		n += "_t"+threadid;
	}
	if( postid )
	{
		u += "&highlight="+postid;
		n += "_p"+postid;
	}
	var w = window.open( u, n, "WIDTH=550,HEIGHT=450,RESIZABLE=1" );
	w.focus();
}



