color=new Array('#CCCCCC','#FFCC00');
cart=0;
bm=0;
ps=0;
sc=0;

if(document.cookie)
{
	r= new RegExp(SCC + '=(\\d+)');
	if(r.test(document.cookie))
	{
		r.exec(document.cookie);
		cart=RegExp.$1;
	}
	r= new RegExp(SCB + '=(\\d+)');
	if(r.test(document.cookie))
	{
		r.exec(document.cookie);
		bm=RegExp.$1;
	}
	r=/rp=(\d+)/;
	if(r.test(document.cookie))
	{
		r.exec(document.cookie);
		ps=RegExp.$1;
		document.cookie='rp='
	}
	r=/sc=1/;
	if(r.test(document.cookie))
	{
		sc=1;document.cookie='sc=0'
	}
}

function right(e) { 
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2)) 
return false; 
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) { 
alert("better contact info@berlinerkunstkontakter.de"); 
return false; 
} 
return true; 
} 
document.onmousedown=right; 
if (document.layers) window.captureEvents(Event.MOUSEDOWN); 
window.onmousedown=right; 

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 MM_controlSound(x, _sndObj, sndFile) { //v3.0 
var i, method = "", sndObj = eval(_sndObj); 
if (sndObj != null) { 
if (navigator.appName == 'Netscape') method = "play"; 
else { 
if (window.MM_WMP == null) { 
window.MM_WMP = false; 
for(i in sndObj) if (i == "ActiveMovie") { 
window.MM_WMP = true; break; 
} } 
if (window.MM_WMP) method = "play"; 
else if (sndObj.FileName) method = "run"; 
} } 
if (method) eval(_sndObj+"."+method+"()"); 
else window.location = sndFile; 
} 



function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor,hugger,hugMargin) {


        if (bgcolor=="") {
                bgcolor="#FFFFFF";
        }
        var adj=10
        var w = screen.width;
        var h = screen.height;
        var byFactor=1;

        if(w<740){
          var lift=0.90;
        }
        if(w>=740 & w<835){
          var lift=0.91;
        }
        if(w>=835){
          var lift=0.93;
        }
        if (imageWidth>w){
          byFactor = w / imageWidth;
          imageWidth = w;
          imageHeight = imageHeight * byFactor;
        }
        if (imageHeight>h-adj){
          byFactor = h / imageHeight;
          imageWidth = (imageWidth * byFactor);
          imageHeight = h;
        }

        var scrWidth = w-adj;
        var scrHeight = (h*lift)-adj;

        if (imageHeight>scrHeight){
            imageHeight=imageHeight*lift;
          imageWidth=imageWidth*lift;
        }

        var posLeft=0;
        var posTop=0;

        if (hugger == "hug image"){
          if (hugMargin == ""){
            hugMargin = 0;
          }
          var scrHeightTemp = imageHeight - 0 + 2*hugMargin;
          if (scrHeightTemp < scrHeight) {
                scrHeight = scrHeightTemp;
          }
          var scrWidthTemp = imageWidth - 0 + 2*hugMargin;
          if (scrWidthTemp < scrWidth) {
                scrWidth = scrWidthTemp;
          }

          if (scrHeight<100){scrHeight=100;}
          if (scrWidth<100){scrWidth=100;}

          posTop =  ((h-(scrHeight/lift)-adj)/2);
          posLeft = ((w-(scrWidth)-adj)/2);
         }

        if (imageHeight > (h*lift)-adj || imageWidth > w-adj){
                imageHeight=imageHeight-adj;
                imageWidth=imageWidth-adj;
        }
        posTop = parseInt(posTop);
        posLeft = parseInt(posLeft);
        scrWidth = parseInt(scrWidth);
        scrHeight = parseInt(scrHeight);

        var agt=navigator.userAgent.toLowerCase();
        if (agt.indexOf("opera") != -1){
          var args= new Array();
          args[0]='parent';
          args[1]=imageName;
          var i ; document.MM_returnValue = false;
          for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
        } else {
        newWindow = window.open("vwd_justso.htm","newWindow","width="+scrWidth+",height="+scrHeight+",left="+posLeft+",top="+posTop);
        newWindow.document.open();
        newWindow.document.write('<html><title>'+alt+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' onBlur="self.close()" onClick="self.close()">');
        newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+scrHeight+' ><tr><td>');
        newWindow.document.write('<img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="Click screen to close" >');
        newWindow.document.write('</td></tr></table></body></html>');
        newWindow.document.close();
        newWindow.focus();
        }
}





function rp()
{
	if(ps>0)window.scrollTo(0,ps);
	if(sc==1)p(url1,'scadd',150,150)
}
function sp()
{
	if(window.pageYOffset)
	{
		document.cookie='rp='+window.pageYOffset
	}else if(document.body&&document.body.scrollTop)
	{
		document.cookie='rp='+document.body.scrollTop
	}
}
function spc()
{
	sp();document.cookie='sc=1'
}
function c(div,colornr)
{
	div.style.backgroundColor=color[colornr];
}
function j(sURL)
{
	top.location.href=sURL;
	return false;
}
function p(sURL,sName,sWidth,sHeight,titel)
{
	w=window.open(sURL,sName,'height='+sHeight+',left='+(screen.width-sWidth)/2+',location=no,menubar=no,resizable=no,scrollbars=auto,status=no,toolbar=no,top='+(screen.height-sHeight-20)/2+',width='+sWidth);w.focus();
}
function phelp(sURL,sName,sWidth,sHeight)
{
	w=window.open(sURL,sName,'height='+sHeight+',left='+(screen.width-sWidth)/2+',location=no,menubar=no,resizable=no,scrollbars=yes,status=no,toolbar=no,top='+(screen.height-sHeight)/2+',width='+sWidth);
	w.focus();
}
function t(sURL)
{
	window.open(sURL);
	return false;
}
function tabover(img)
{
	img.src = img.src.replace('r_', 'mr_');
}
function tabout(img)
{
	img.src = img.src.replace('mr_', 'r_');
}

function mover(img)
{
	img.src = img.src.replace('_nmo', '_mo');
}

function mout(img)
{
	img.src = img.src.replace('_mo', '_nmo');
}
function v(){}
