
/** file: default.js */
function $(id) {
	return document.getElementById(id);
}
function setOrderType() {
	var objCreditcard = $("orderType1");
	var objDealer = $("orderType2");
	var objGetanoffer = $("orderType3");
	var objForhandler = $("Forhandler");
	var objForhandler1 = $("Forhandler1");
	var objForm = $("bestilling");
	var objOrderTypeDealerTbody = $("orderTypeDealerTbody");
	try {
		if (objCreditcard.checked) {
			objForm.action = "checkout2.asp";
			objOrderTypeDealerTbody.style.display = "none";
			objForhandler.checked = true;
		}
		else if (objDealer.checked) {
			objForm.action = "http://formmail.uni2.dk/FormMail";
			objOrderTypeDealerTbody.style.display = "block";
		}
		else if (objGetanoffer.checked) {
			objForm.action = "http://formmail.uni2.dk/FormMail";
			objOrderTypeDealerTbody.style.display = "none";
			objForhandler.checked = true;
		}
	}
	catch(e){}
	setDealerType();
}
function setDealerType() {
	var objForm = $("bestilling");
	var objForhandler = $("Forhandler");
	var objForhandler1 = $("Forhandler1");
	var objOrderTypeIPickDealerTbody = $("orderTypeIPickDealerTbody");
	try {
		if (objForhandler.checked)
			objOrderTypeIPickDealerTbody.style.display = "none";
		else
			objOrderTypeIPickDealerTbody.style.display = "block";
	}
	catch(e){}
}
function orderOnSubmit() {
	errors = false;
	return !errors;
}
var newwin = null;
function doPopup() {
	newwin = window.open('', 'paywin', 'scrollbars,status,width=550,height=600');
	newwin.focus();
	return true;
}
function validateEmail(str) {
	if (validateIsEmpty(str))
		return false;
	var regex = /^([\w\-\.]+)@((\[([0-9]{1,3}\.){3}[0-9]{1,3}\])|(([\w\-]+\.)+)([a-zA-Z]{2,4}))$/;
    return regex.test(str);
}
function validateString(str, minLen, maxLen) {
	if (validateIsEmpty(str))
		return false;
	return !(str.length < minLen || str.length > maxLen);
}
function validateStringNoNumbers(str, minLen, maxLen) {
	if (validateIsEmpty(str))
		return false;
	var regex = /[0-9]+/gi;
	if (regex.test(str))
		return false;
	return !(str.length < minLen || str.length > maxLen);
}
function validateAlphaNumber(str, minLen, maxLen) {
	if (validateIsEmpty(str))
		return false;
	var regex = /^[0-9a-z]+$/gi;
	if (!regex.test(str))
		return false;
	return !(str.length < minLen || str.length > maxLen);
}
function validateNumber(number) {
	if (validateIsEmpty(number))
		return false;
	var regex = /^[0-9]+$/;
	return regex.test(str);
}
function validateTelephone(number) {
	if (validateIsEmpty(number))
		return false;
	number = "" + number;
	number = number.replace(/[\(\)\+\- ]*/g, "");
	var regex = /^[0-9]{8,}$/;
	return regex.test(number);
}
function validateVat(str) {
	if (validateIsEmpty(str))
		return false;
	str = "" + str;
	str = str.replace(/[\(\)\- ]*/g, "");
	var regex = /^[0-9a-zA-Z]{8,18}$/;
	return regex.test(str);
}
function validateIsEmpty(str) {
	return (""+str == "undefined" || str == null || str.length == 0);
}
function getFlashMovieObject(movieName) {
	if (window.document[movieName])
		return window.document[movieName];
	if (navigator.appName.indexOf("Microsoft Internet")==-1) {
		if (document.embeds && document.embeds[movieName])
			return document.embeds[movieName]; 
	}
	else
		return $(movieName);
	return false;
}
function getFlashMovieVariable(movieName, variable) {
	var flashMovie = getFlashMovieObject(movieName);
	var value = "";
	try { 
		value = flashMovie.GetVariable(variable); 
		for (index in flashMovie) {
			if (flashMovie[index].GetVariable) {
				value = flashMovie[index].GetVariable(variable);
				break;
			}
		}
	}
	catch(e){}
	return value;
}
function setFlashMovieVariable(movieName, variable, value) {
	var flashMovie = getFlashMovieObject(movieName);
	try { 
		flashMovie.SetVariable(variable, value); 
		for (index in flashMovie) {
			if (flashMovie[index].SetVariable) {
				flashMovie[index].SetVariable(variable, value);
				break;
			}
		}
	}catch(e){}
}
function menunewbuttonover(id) {
	$(id).style.backgroundPosition = "0px -22px";
	return true;
}
function menunewbuttonout(id) {
	$(id).style.backgroundPosition = "0px 0px";
	return true;
}
/** end file: default.js */
/** file: menubar.js */
/** end file: menubar.js */
/** file: activateFlash.js */
function FL_GetHTML(objAttrs, params, embedAttrs) {
	var str = '<object ';
	for (var i in objAttrs)
		str += i + '="' + objAttrs[i] + '" ';
	str += '>';
	for (var i in params)
		str += '<param name="' + i + '" value="' + params[i] + '" /> ';
	str += '<embed ';
	for (var i in embedAttrs)
		str += i + '="' + embedAttrs[i] + '" ';
	str += ' ></embed></object>';
	return str;
}
function FL_Generateobj(objAttrs, params, embedAttrs) { 
  var str = FL_GetHTML(objAttrs, params, embedAttrs);
  document.write(str);
}
function FL_GetContent(){
  var ret = 
    FL_GetArgs
    (  arguments, "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  return FL_GetHTML(ret.objAttrs, ret.params, ret.embedAttrs);
}
function FL_RunContent(){
  var ret = 
    FL_GetArgs
    (  arguments, "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  FL_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function FL_GetArgs(args, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    
    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblclick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
      case "id":
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
/** end file: activateFlash.js */

/** file: unitabs4.js */
function tabCls(jsId, tableid) {
	/** Copyright UniFlip A/S and UniFlip Inc. All rights reserved. */
	this.useRequestDebug = false;
	this.jsId = jsId;
	this.activeTab = null;
	this.activeTabId = null;
	this.tabsTableId = tableid;
	this.tabsTableObj = $(tableid);
	this.tabs = new Object();
	this.tabsIndex = new Object();
	this.tabs["items"] = 0;
	this.tabsMouseoverTimer = null;
	this.tabsMouseoverTimerInterval = 500;
	this.tabsMouseoverTimerActive = true;
	this.winLoc = window.location.href.toString();
	this.winLocLen = 1 * this.winLoc.length;
	this.tabsTableRow0C0 = this.tabsTableObj.rows[0].cells[0];
	this.tabsTableRow1C0 = this.tabsTableObj.rows[1].cells[0];
	this.tabsTableRow2C0 = this.tabsTableObj.rows[2].cells[0];
	this.tabsTableRow2C1 = this.tabsTableObj.rows[2].cells[1];
	this.tabsTableRow2C2 = this.tabsTableObj.rows[2].cells[2];
	this.tabsTableRow0C0.style.backgroundPosition = (this.tabsTableObj.offsetWidth - 600) + "px 0px";
	this.tabsTableRow2C0.style.backgroundPosition = "0px " + (this.tabsTableRow2C0.offsetHeight - 1000) + "px";
	this.tabsTableRow2C1.style.backgroundPosition = this.tabsTableRow2C0.style.backgroundPosition;
	this.tabsTableRow2C2.style.backgroundPosition = this.tabsTableRow2C0.style.backgroundPosition;
	this.addTab = function(tabid, contentid) {
		this.tabs[tabid] = {
			"tabid" : tabid,
			"tabObj" : $(tabid),
			"contentid" : contentid,
			"contentObj" : $(contentid)
		};
		this.tabsIndex[this.tabs.items] = tabid;
		var tabs = this.tabs;
		var tab = tabs[tabid];
		var tabObj = tab.tabObj;
		var jsId = this.jsId;
		var jsCls = eval(this.jsId);
		var tabsMouseoverTimer = this.tabsMouseoverTimer;
		var tabsMouseoverTimerInterval = this.tabsMouseoverTimerInterval;
		var tabsMouseoverTimerActive = this.tabsMouseoverTimerActive;
		tab.tabObj.onmouseover = function() {
			//tab.tabObj.childNodes[0].style.textDecoration = "underline";
			window.clearTimeout(tabsMouseoverTimer);
			if (tabsMouseoverTimerActive)
				tabsMouseoverTimer = window.setTimeout("" + jsId + ".tabs['" + tabid + "'].tabObj.onclick();", tabsMouseoverTimerInterval);
		}
		tab.tabObj.onmouseout = function() {
			tab.tabObj.childNodes[0].style.textDecoration = "none";
			window.clearTimeout(tabsMouseoverTimer);
			tabsMouseoverTimer = null;
		}
		tab.tabObj.onclick = function() {
			window.clearTimeout(tabsMouseoverTimer);
			tabsMouseoverTimer = null;
			if (jsCls.activeTab != null) {
				if (jsCls.activeTab == jsCls.tabs[jsCls.tabsIndex[0]].tabObj)
					jsCls.activeTab.style.backgroundPosition = "0px -62px";
				else
					jsCls.activeTab.style.backgroundPosition = "0px 0px";
				jsCls.activeTab.childNodes[0].style.backgroundPosition = (jsCls.activeTab.clientWidth - 10) + "px 0px";
				jsCls.activeTab.childNodes[0].style.color = "#1B3765";
				jsCls.tabs[jsCls.activeTabId].contentObj.style.display = "none";
			}
			if (tabObj == jsCls.tabs[jsCls.tabsIndex[0]].tabObj)
				tabObj.style.backgroundPosition = "0px -93px";
			else
				tabObj.style.backgroundPosition = "0px -31px";
			tabObj.childNodes[0].style.backgroundPosition = (tab.tabObj.clientWidth - 10) + "px -31px";
			tabObj.childNodes[0].style.color = "#ffffff";
			tab.contentObj.style.display = "block";
			tab.contentObj.style.top = 0;
			jsCls.activeTab = tabObj;
			jsCls.activeTabId = tabid;
			return true;
		}
		this.tabs.items++;
		if (this.tabs.items > 1) {
			tab.tabObj.style.backgroundPosition = "0px 0px";
			tab.tabObj.childNodes[0].style.backgroundPosition = (tab.tabObj.clientWidth - 10) + "px 0px";
			tab.tabObj.childNodes[0].style.color = "#1B3765";
			tab.contentObj.style.display = "none";
			if (this.winLoc.substr(this.winLocLen - (tabid.length + 1), tabid.length + 1) == "#" + tabid) {
				this.tab.tabObj.onclick();
			}
		}
		else {
			tab.tabObj.style.backgroundPosition = "0px -93px";
			tab.tabObj.childNodes[0].style.backgroundPosition = (tab.tabObj.clientWidth - 10) + "px -31px";
			tab.tabObj.childNodes[0].style.color = "#ffffff";
			tab.contentObj.style.display = "block";
			tab.contentObj.style.top = "0px";
			jsCls.activeTab = tab.tabObj;
			jsCls.activeTabId = tabid;
		}
		return this.tabs[tabid];
	}
}
/** end file: unitabs4.js */


var uniAccordionActiveId = null;
var uniAccordionActiveHoverId = null;
function uniAccordionOver(e,id){
	uniAccordionOut(e,uniAccordionActiveHoverId);
	if($(id).className.indexOf("accHeadingActive")>-1)
		return false;
	$(id).className="accHeading accHeadingOver";
	uniAccordionActiveHoverId=id;
}
function uniAccordionOut(e,id){
	if(id==null)
		return false;
	else if($(id).className.indexOf("accHeadingActive")>-1)
		return false;
	$(id).className="accHeading";
	uniAccordionActiveHoverId=null;
}
function uniAccordionOpen(id){
	uniAccordionClose();
	var o=$(id);
	var o2=o.getElementsByTagName("td")[0];
	o2.innerHTML="-"+o2.innerHTML.substr(1);
	o.className="accHeading accHeadingActive";
	$(id+"c").style.display="block";
	uniAccordionActiveId=id;
	uniAccordionActiveHoverId=null;
}
function uniAccordionClose(){
	if(uniAccordionActiveId==null)
		return false;
	var o = $(uniAccordionActiveId);
	var o2=o.getElementsByTagName("td")[0];
	o2.innerHTML="+"+o2.innerHTML.substr(1);
	o.className="accHeading";
	$(uniAccordionActiveId+"c").style.display="none";
	uniAccordionActiveId=null;
}
