if(!document.getElementById){
  if(document.all)
  document.getElementById=function(){
    if(typeof document.all[arguments[0]]!="undefined")
    return document.all[arguments[0]]
    else
    return null
  }
  else if(document.layers)
  document.getElementById=function(){
    if(typeof document[arguments[0]]!="undefined")
    return document[arguments[0]]
    else
    return null
  }
}

function MM_preloadImages()
{ //v3.0
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
	if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function imgChange(element,img)
{
	eval("document."+element).src = img;
}

function writeflash(flash,w,h,vars)
{
	document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\""+w+"\" height=\""+h+"\">");
	document.writeln("<param name=\"movie\" value=\"swf/"+flash+"\">");
	document.writeln("<param name=\"allowScriptAccess\" value=\"sameDomain\">");
	document.writeln("<param name=\"quality\" value=\"high\">");
        document.writeln("<param name=\"FlashVars\" value=\""+vars+"\">");
	document.writeln("<embed src=\"swf/"+flash+"\" FlashVars=\""+vars+"\" width=\""+w+"\" height=\""+h+"\" quality=\"high\" allowScriptAccess=\"sameDomain\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" bgcolor=\"#FFFFFF\"></embed>");
	document.writeln("</object>");
}

function openpopwin(popurl,w,h)
{
	//document.getElementById("dropbox").style.display="none";
	window.open(popurl,"popimage","width=" + w + ",height=" + h +"");
}

function togglekorg(item,cc,artnr,frm)
{
	obj = eval("document."+frm+".remitem"+cc);
	if(item.className=="kundkorg1") 
	{
		item.className="kundkorg2";
		obj.value = artnr;
	}
	else 
	{
		item.className="kundkorg1";
		obj.value=0;
	}
}

function openpop(img)
{
	// document.getElementById("dropbox").style.display="none";
	
	if(document.getElementById) var thediv = document.getElementById('popup');
	else if (document.all) var thediv = document.all['popup'];

	thediv.innerHTML="<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" height=\"100%\"><tr><td width=\"268\"></td><td width=\"275\" onclick=\"javascript:closepop();\" style=\"background-color:#FFFFFF;cursor:pointer;text-align:center;border:1px solid #000000;\"><img src=\""+img+"\"><br><img src=\"images/popclosebutton.gif\"></td><td width=\"20\"></td></tr></table>";

	thediv.style.display = "block";
}
function closepop()
{
	if(document.getElementById) var thediv = document.getElementById('popup');
	else if (document.all) var thediv = document.all['popup'];
	thediv.style.display = "none";
	
	// document.getElementById("dropbox").style.display="block";
}
function gallerypop(img)
{
	if(document.getElementById) var thediv = document.getElementById('galpop');
	else if (document.all) var thediv = document.all['galpop'];

	thediv.innerHTML="<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" height=\"100%\"><tr><td width=\"275\" onclick=\"javascript:closegallery();\" style=\"background-color:#FFFFFF;cursor:pointer;text-align:right;border:1px solid #000000;\"><img src=\""+img+"\"><br><img src=\"images/popclosebutton.gif\"></td><td width=\"20\"></td></tr></table>";

	thediv.style.display = "block";
}
function closegallery()
{
	if(document.getElementById) var thediv = document.getElementById('galpop');
	else if (document.all) var thediv = document.all['galpop'];
	thediv.style.display = "none";
}
function iFrameHeight(h)
{
	document.getElementById('frame_content').height = h+10;
}

