
function Bestil_Form1_Validator(theForm)
{

  if (theForm.Produkt.value == " Text eller varunr")
  {
    alert("_______________________\n\n Vilken produkt söker du efter \n- et sökord är nödvändigt!\n_______________________");
    theForm.Produkt.focus();
    return (false);
  }
if (theForm.Produkt.value == "")
  {
    alert("_______________________\n\n Vilken produkt söker du efter \n- et sökord är nödvändigt!\n_______________________");
    theForm.Produkt.focus();
    return (false);
  } 
}

function popUp(url) {
sealWin=window.open(url,"win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable=0,width=720,height=600');  
  if (sealWin.opener == null) sealWin.opener = self;
}


function setCookie(name, value, expire, path) {  
	document.cookie = name + "=" + escape(value)+ "; expires=" + expire.toGMTString() + "; path= /";
}


function deleteCookie(name) {
	var expire = new Date()   
	if (getCookie(name)){
		document.cookie = name + "=" + "; expires=" + expire.toGMTString();
	}
}	 

function getCookie(name) {
	var find = name + "=";
	if (document.cookie.length > 0) {
		setoff = document.cookie.indexOf(find);
		if (setoff != -1) {
			setoff += find.length;
			end = document.cookie.indexOf(";", setoff);
			if (end == -1) {
				end = document.cookie.length;
			}
			return unescape(document.cookie.substring(setoff, end));
		}
	} 
}	  
  
function register(name) {   
	var today = new Date();
	var expires = new Date();
	expires.setTime(today.getTime() + 1000*60*60*24*2);  
	setCookie("returnURL", name, expires);
}


var user;
var domain;
var suffix;
function jemail(user, domain, suffix){
document.write('<a href="' + 'mailto:' + user + '@' + domain + '.' + suffix + '">'+ ' MAILA TILL HARALD NYBORG' + '</a>');
}







function mailSubscribe(URL) {

	width = 450;
	height = 250;

	left_position = (screen.width)?(screen.width-width)/2:100;
	top_position = (screen.height)?(screen.height-height-100)/2:100;

	var page = window.open(URL, "Newsletter", "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" + width +",height=" + height + ",left=" + left_position + ",top=" + top_position);

	if (window.focus) {page.focus()}
	return false;
	
}






