<!--
function MoveOver(txt)
{
   window.status = txt;
}
/////////////////////////////////////////////////////////////////////////////////
function Forhandsgranska(sida)
{
	props=window.open(''+sida+'', 'Förhandgranska', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=0, width=700, height=500 left = 20, top = 20');
}
/////////////////////////////////////////////////////////////////////////////////
function SkrivUtFonster(sida,vad,id)
{
	props=window.open(''+sida+'skrivut.php?id='+id+'&v='+vad+'', 'Utskrift', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=0, width=670, height=400 left = 50, top = 50');
}
/////////////////////////////////////////////////////////////////////////////////
function Cookies()
{
	props=window.open('cookies.php', 'Utskrift', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=0, width=400, height=320 left = 50, top = 50');
}
/////////////////////////////////////////////////////////////////////////////////
function TipsaFonster(Vad,Id)
{
	var winl = (screen.width - 380) / 2;
	var wint = (screen.height - 380) / 2;
	props=window.open('tipsa.php?id='+Id+'&t='+Vad+'', 'Tipsa', 'toolbars=no, scrollbars=no, location=no, statusbars=no, menubars=no, resizable=no, width=380, height=420, left = '+winl+', top = '+wint+' ');
}
/////////////////////////////////////////////////////////////////////////////////
function ZipFonster(Vad,Id)
{
	var winl = (screen.width - 300) / 2;
	var wint = (screen.height - 190) / 2;
	props=window.open('zip.php?id='+Id+'&t='+Vad+'', 'Tipsa', 'toolbars=no, scrollbars=no, location=no, statusbars=no, menubars=no, resizable=no, width=380, height=190, left = '+winl+', top = '+wint+' ');
}
/////////////////////////////////////////////////////////////////////////////////
function VisaBilder(Sida,Vad,Id,Bredd,Hojd)
{
	var winl = (screen.width - Bredd) / 2;
	var wint = (screen.height - Hojd) / 2;
	props=window.open(''+Sida+'?id='+Id+'&t='+Vad+'', 'Bilder', 'toolbars=no, scrollbars=no, location=no, statusbars=no, menubars=no, resizable=no, width='+Bredd+', height='+Hojd+', left = '+winl+', top = '+wint+' ');
}
/////////////////////////////////////////////////////////////////////////////////
function VisaBilderProdukter(Sida,BildId,ProId,Bredd,Hojd)
{
	var winl = (screen.width - Bredd) / 2;
	var wint = (screen.height - Hojd) / 2;
	props=window.open(''+Sida+'?id='+ProId+'&bid='+BildId+'&t=pro', 'Produktbilder', 'toolbars=no, scrollbars=auto, location=no, statusbars=no, menubars=no, resizable=no, width='+Bredd+', height='+Hojd+', left = '+winl+', top = '+wint+' ');
}
/////////////////////////////////////////////////////////////////////////////////
function KontaktaAdmin(Siddel,Sida)
{
	var winl = (screen.width - 380) / 2;
	var wint = (screen.height - 505) / 2;
	props=window.open(''+Sida+'?s='+Siddel+'', 'Kontakta', 'toolbars=no, scrollbars=auto, location=no, statusbars=no, menubars=no, resizable=no, width=380, height=505, left = '+winl+', top = '+wint+' ');
}
/////////////////////////////////////////////////////////////////////////////////
function CentreratFonster(Sida,Namn,Bredd,Hojd)
{
	var winl = (screen.width - Bredd) / 2;
	var wint = (screen.height - Hojd) / 2;
	props=window.open(''+Sida+'', ''+Namn+'', 'toolbars=0, scrollbars=0, location=0, statusbars=0, menubars=0, resizable=0, width='+Bredd+', height='+Hojd+' left = '+winl+', top = '+wint+' ');
}
/////////////////////////////////////////////////////////////////////////////////
function Smilies()
{
	props=window.open('smilies.php', 'Smilies', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=0, width=400, height=200 left = 100, top = 100');
}
/////////////////////////////////////////////////////////////////////////////////
function StartaSlide(Sida) 
{
	opener.parent.location.href=''+Sida+'';
	window.close();
}
/////////////////////////////////////////////////////////////////////////////////
function storeCaret(textEl) {
	if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}
/////////////////////////////////////////////////////////////////////////////////
function emoticon(text)
 {
	text = ' ' + text + ' ';
	if (document.post.Meddelande.createTextRange && document.post.Meddelande.caretPos)
	{
		var caretPos = document.post.Meddelande.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
		document.post.Meddelande.focus();
	}
	else
	{
		document.post.Meddelande.value  += text;
		document.post.Meddelande.focus();
	}
}
/////////////////////////////////////////////////////////////////////////////////
function InfogaSmiliesFonster(text) {
	text = ' ' + text + ' ';
	if (opener.document.forms['post'].Meddelande.createTextRange && opener.document.forms['post'].Meddelande.caretPos) {
		var caretPos = opener.document.forms['post'].Meddelande.caretPos;
		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
		opener.document.forms['post'].Meddelande.focus();
	} else {
	opener.document.forms['post'].Meddelande.value  += text;
	opener.document.forms['post'].Meddelande.focus();
	}
}
/////////////////////////////////////////////////////////////////////////////////
function checkKontakta()
{

	formErrors = false;
	if (document.post.Namn.value.length < 2) {
		formErrors = "Du måste skriva namn !";
	}
	
	if (document.post.Epostadress.value.length < 2) {
		formErrors = "Du måste skriva e-postadress !";
	}
	
	if (document.post.Meddelande.value.length < 2) {
		formErrors = "Du måste skriva ett meddelande !";
	}
	
	if (document.post.FraganGaller.value == "a") {
		formErrors = "Du måste välja frågan gäller !";
	}

	if (formErrors) {
		alert(formErrors);
		return false;
	}
}
/////////////////////////////////////////////////////////////////////////////////
function Radera(url,namn) 
{ 
	if (confirm("Vill du verkligen radera: " + namn + "  ?"))
	location.href=url;
} 
/////////////////////////////////////////////////////////////////////////////////
function SparraIP(ip,siddel) 
{ 
	if (confirm("Vill du verkligen blockera IP-nummmer " + ip + "?"))
	location.href="admin_sparradeip.php?ip="+ ip  +"&m=n&sd="+ siddel+ "";
} 
/////////////////////////////////////////////////////////////////////////////////
function RaderaBild(url) 
{ 
	if (confirm("Vill du verkligen radera bilden?"))
	location.href=url;
} 
/////////////////////////////////////////////////////////////////////////////////
function Flytta(id,fid,namn,uppner) 
{ 
	if (uppner == "u")
	{
		if (confirm("Vill du lägga till bilden till: " + namn + "?"))
		location.href="?m=b&s=u&fid=" + fid + "&id=" + id  ;
	}
	else
	{
		if (confirm("Vill du ta bort bilden från: " + namn + "?"))
		location.href="?m=b&s=n&fid=" + fid + "&id=" + id  ;
	}
} 
/////////////////////////////////////////////////////////////////////////////////
function Bilder(url,x,y)
{   
	MyWin = window.open("","","width=" + x + ",height=" + y + ",toolbar=no,location=no,directories=no,status=no,menubar=no");
	with(MyWin.document)
	{
		 open();
		write("<html>\n<head>\<title>Bilder</title>\n</head>\n<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0 rightmargin=0>\n");
		write("<img src=\"" + url + "\" width=\"" + x + "\" height=\"" + y + "\">\n");
		write("</body>\n</html>\n");
		close();
	}
}

////////////////////////////////////////////////////////////////////////////////////
function SkrivUt() 
{
	window.print();
}
/////////////////////////////////////////////////////////////////////////////////
function NyttLosenord(url,namn) 
{ 
	if (confirm("Vill du skicka nya inloggningsuppgifter till " + namn + "?"))
	location.href=url;
}

//-->