DefSts = 'PxD Praxis-Discount GmbH';
var data=" ";var done=1; 
function rvsta(text) {decrypt(DefSts+' - '+text,1,1);}
function decrypt(text,max,delay) {if (done) {done = 0;decrypt_helper(text,max,delay,0,max); }}
function decrypt_helper(text,runs_left,delay,charvar,max) {if (!done) {runs_left=runs_left - 1;var status = text.substring(0, charvar); for (var current_char = charvar; current_char < text.length; current_char++) {status += data.charAt(Math.round(Math.random()*data.length));} window.status = status; var rerun = "decrypt_helper('" + text + "'," + runs_left + "," + delay + "," + charvar + ","+max+");";var new_char = charvar+1; var next_char = "decrypt_helper('"+text+"',"+max+","+delay+","+new_char+","+max+");";if(runs_left>0) {setTimeout(rerun,delay);} else {if(charvar<text.length) {setTimeout(next_char,Math.round(delay*(charvar+3)/(charvar+1)));} else {done=1;}}}}
function rvste(){self.status = DefSts;done = 1;}
function rvOpen(n,d,w,h){var l=screen.availWidth-w-10;n=window.open(d,n,"width="+w+",height="+h+",status=no,toolbar=no,menubar=no,scrollbars=1,resizable=0,top=0,left="+l);n.focus();}
function rvWin(n,d,w,h){var l=screen.availWidth-w-10;n=window.open(d,n,"width="+w+",height="+h+",status=yes,location=yes,toolbar=yes,menubar=yes,scrollbars=1,resizable=1,top=0,left="+l);n.focus();}
function rvPrint(n){var win=window.open(n,"PrintView","width=150,height=150,top=1,left=1,status=No,menubar=No,scrollbars=No, resizable=No,toolbar=No,alwaysLowered=Yes");}
function rvSwitch3(f1,f2,f3){parent.RVnavi.location = f3;parent.RVleft.location = f2;parent.RVmain.location = f1;}

function rvAddCart(art,anzfield) {
	parent.RVshop.location = '/data/wk.html?Open&id=b&o='+art+'&m='+anz;
	art = eval("document.best.ART.value");
}
function rvAddCartF(wo,was,wie) {
	art = eval("document.forms['"+wo+"'].elements['"+was+"'].value");
	anz = eval("document.forms['"+wo+"'].elements['"+wie+"'].value");
	if(art=='') {return;}
	if(anz=='') {
		anz=prompt('Welche Menge des Artikels '+art+' möchten Sie bestellen?','1');
	}
	while (isNaN(parseFloat(anz))) {
		anz=prompt('Nur numerische Werte für die Menge gültig.\nWelche Menge des Artikels '+art+' möchten Sie bestellen?','1');
		if (anz == null) {return;}
	}
	if (anz != null ) {
		parent.RVshop.location = '/data/wk.html?Open&id=b&o='+art+'&m='+anz;
	}
}
function rvRPCart(wo,was,wie) {
	parent.RVshop.location = '/data/wk.html?Open&id=p&o='+wo+was+'&m='+wie;
	closeit('RVmain');
}

var dragapproved=false
var minrestore=0
var initialwidth,initialheight
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all
function iecompattest(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function loadwindow(url,width,height,wtop,wleft,whead,wframe) {
if (!ie5&&!ns6) 
	top.rvOpen(url,whead,width,height)
	//window.open(url,"","width=width,height=height,scrollbars=1")
else {
	parent.frames[wframe].document.getElementById("wwindow").style.display=''
	parent.frames[wframe].document.getElementById("wwindow").style.width=initialwidth=width+"px"
	parent.frames[wframe].document.getElementById("wwindow").style.height=initialheight=height+"px"
	parent.frames[wframe].document.getElementById("wwindow").style.left=wleft+"px"
	parent.frames[wframe].document.getElementById("wwindow").style.left=wleft+"px"
	parent.frames[wframe].document.getElementById("wwindow").style.top=ns6? window.pageYOffset*1+wtop+"px" : top.iecompattest().scrollTop*1+wtop+"px"
	parent.frames[wframe].document.getElementById("wiframe").src=url
     }
}
function initializedrag(e,wframe){
alert('hier')
	offsetx=ie5? event.clientX : e.clientX
	offsety=ie5? event.clientY : e.clientY
	parent.frames[wframe].document.getElementById("wwindowcontent").style.display="none" //extra
	tempx=parseInt(parent.frames[wframe].document.getElementById("wwindow").style.left)
	tempy=parseInt(parent.frames[wframe].document.getElementById("wwindow").style.top)
	dragapproved=true
	parent.frames[wframe].document.getElementById("wwindow").onmousemove=top.drag_drop(e,wframe)
}
function drag_drop(e,wframe){
	if (ie5&&dragapproved&&event.button==1){
		parent.frames[wframe].document.getElementById("wwindow").style.left=tempx+event.clientX-offsetx+"px"
		parent.frames[wframe].document.getElementById("wwindow").style.top=tempy+event.clientY-offsety+"px"
	}
	else if (ns6&&dragapproved){
		parent.frames[wframe].document.getElementById("wwindow").style.left=tempx+e.clientX-offsetx+"px"
		parent.frames[wframe].document.getElementById("wwindow").style.top=tempy+e.clientY-offsety+"px"
	}
}
function maximize(wframe){
	if (minrestore==0){
		minrestore=1 //maximize window
		parent.frames[wframe].document.getElementById("maxname").setAttribute("src","restore.gif")
		parent.frames[wframe].document.getElementById("wwindow").style.width=ns6? window.innerWidth-20+"px" : top.iecompattest().clientWidth+"px"
		parent.frames[wframe].document.getElementById("wwindow").style.height=ns6? window.innerHeight-20+"px" : top.iecompattest().clientHeight+"px"
	} else {
		minrestore=0 //restore window
		parent.frames[wframe].document.getElementById("maxname").setAttribute("src","max.gif")
		parent.frames[wframe].document.getElementById("wwindow").style.width=initialwidth
		parent.frames[wframe].document.getElementById("wwindow").style.height=initialheight
	}
	parent.frames[wframe].document.getElementById("wwindow").style.left=ns6? window.pageXOffset+"px" : top.iecompattest().scrollLeft+"px"
	parent.frames[wframe].document.getElementById("wwindow").style.top=ns6? window.pageYOffset+"px" : top.iecompattest().scrollTop+"px"
}

function stopdrag(wframe) {
	dragapproved=false;
	parent.frames[wframe].document.getElementById("wwindow").onmousemove=null;
	parent.frames[wframe].document.getElementById("wwindowcontent").style.display="" //extra
}
function closeit(wframe) {
	parent.frames[wframe].document.getElementById("wwindow").style.display="none";
	var obj	= parent.frames[wframe].document.getElementById("start");
	if (obj != null) {
		obj.style.visibility  = '';
	} 
}
