   function writeDate() {

      idag = new Date();
      ar = idag.getYear();
      if(ar < 1000) ar += 1900;
      man = idag.getMonth();
      dag = idag.getDay();
      datum = idag.getDate();

      dagar = new Array('S&ouml;ndag','M&aring;ndag','Tisdag','Onsdag','Torsdag','Fredag','L&ouml;rdag');
      manader = new Array('januari','februari','mars','april','maj','juni','juli','augusti','september','oktober','november','december');

      document.write(""+dagar[dag]+" "+datum+" "+" "+manader[man]+" "+ ar);
   }



    win1pop = 'screenX=100,'
		+ 'screenY=150,'
		+ 'toolbar=no,'
		+ 'location=no,'
		+ 'status=no,'
		+ 'menubar=no,'
		+ 'scrollbars=yes,'
		+ 'resizable=yes,'
		+ 'copyhistory=no,'
		+ 'width=650,'
		+ 'height=220';

    function openWindow(winUrl,winName,options) {
       optionsEvaled = eval(options);
       window.open(winUrl,winName,optionsEvaled);
    }





function checkLocation() {
	if (top.location == location) {
		top.location.href = "/?url=" + document.location.href;
	}
}

//window.onload = checkLocation;



function flash(strFile, strId, strClass, intWidth, intHeight) {

	document.write("<object class=\"" + strClass + "\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" name=\"" + strId + "\" width=\"" + intWidth + "\" height=\"" + intHeight + "\" id=\"" + strId + "\">");
	document.write("<param name=\"movie\" value=\"swf/" + strFile + "\" />");
	document.write("<param name=\"quality\" value=\"high\" />");
	document.write("<param name=\"wmode\" value=\"transparent\">");
	document.write("<param name=\"SCALE\" value=\"noborder\">");
	document.write("<param name=\"menu\" value=\"false\">");
	document.write("<embed class=\"" + strClass + "\" src=\"swf/" + strFile + "\" width=\"" + intWidth + "\" height=\"" + intHeight + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" scale=\"noborder\" menu=\"false\" name=\"" + strId + "\"></embed></object>");
}


function GP_AdvOpenWindow(theURL,winName,features,popWidth,popHeight,center,ignorelink,alwaysOnTop,autoCloseTime,borderless) { //v1.1
  var autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;  
  if (popWidth > 0) features += (features.length > 0 ? ',' : '') + 'width=' + popWidth;
  if (popHeight > 0) features += (features.length > 0 ? ',' : '') + 'height=' + popHeight;
  if (center && center != "" && popWidth > 0 && popHeight > 0) {
    if (document.all || document.layers || document.getElementById) {
      w = screen.availWidth; h = screen.availHeight;}
    var leftPos = (w-popWidth)/2, topPos = (h-popHeight)/2;
    features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;}
  if (document.all && borderless && borderless != "" && features.indexOf("fullscreen") != -1) features+=",fullscreen=1";
  popupWindow = window.open(theURL,winName,features);
  if (popupWindow.opener == null) popupWindow.opener = self;    
  if (document.all || document.layers || document.getElementById) {
    if (borderless && borderless != "") {popupWindow.resizeTo(popWidth,popHeight); popupWindow.moveTo(leftPos, topPos);}
    if (alwaysOnTop && alwaysOnTop != "") {
    	ontopIntervalHandle = popupWindow.setInterval("window.opener.popupWindow.focus();", 50);
    	popupWindow.document.body.onload = function() {popupWindow.setInterval("window.opener.popupWindow.focus();", 50);}; }
    if (autoCloseTime && autoCloseTime > 0) {
    	popupWindow.document.body.onbeforeunload = function() {
  			if (autoCloseTimeoutHandle) window.clearInterval(autoCloseTimeoutHandle);
    		window.onbeforeunload = null;	}  
   		autoCloseTimeoutHandle = window.setTimeout("popupWindow.close()", autoCloseTime * 1000); }
  	window.onbeforeunload = function() {popupWindow.close();}; }   
  document.MM_returnValue = (ignorelink && ignorelink != "") ? false : true;
}


function toggleDiv() {
	for (inttoggleDiv = 0; inttoggleDiv < arguments.length; inttoggleDiv++) {
	
		if (document.getElementById(arguments[inttoggleDiv]).style.visibility == "visible") {
			document.getElementById(arguments[inttoggleDiv]).style.visibility = "hidden";	
		} else {
			document.getElementById(arguments[inttoggleDiv]).style.visibility = "visible";	
		}
	}
}


function getURL() {
	window.location = arguments[0];
}

function formVerify() {
	
	boolAlert = false;
	for (intLoop = 1; intLoop < arguments.length; intLoop++) {
		boolEmpty = false;
		switch(document.getElementsByName(arguments[intLoop])[0].type) {
		
			case "checkbox":
				if (document.getElementsByName(arguments[intLoop])[0].checked != true) { boolEmpty = true; }
				break;		
		
			case "radio":
				boolEmpty = true;
				for (intSubLoop = 0; intSubLoop < document.getElementsByName(arguments[intLoop]).length; intSubLoop++) {
					if (document.getElementsByName(arguments[intLoop])[intSubLoop].checked == true) { boolEmpty = false; }
				}
				break;

			case "select-one":
				if (document.getElementsByName(arguments[intLoop])[0].selectedIndex == 0) { boolEmpty = true; }
				break;		

			default:
				if (document.getElementsByName(arguments[intLoop])[0].value.replace(/ /g, "").length == 0) { boolEmpty = true; }
				break;		
		
		}

		if (boolEmpty == true) { boolAlert = true; }

	}

	if (boolAlert == true) { 
		alert(arguments[0]);
		return false;
	} else {
		return true;
	}
}

function changeSrc() {

	objTarget = document.getElementById(arguments[0]);
	strUrl = "project_image.asp?image=" + arguments[1];

	objTarget.src = strUrl;

}


