// JavaScript Document
function accPopup(theURL,winName,features) {
		newwindow=window.open(theURL,winName,features);
		if (window.focus) {newwindow.focus()}
		return false;
}

function showHideNav(targ) {
	if (document.getElementById) {
		targ1 = document.getElementById(targ);
		targ2 = document.getElementById("subm_"+targ);
		if (targ2.className=='hidden') {
			targ1.className='selected';
			targ2.className='shown';
		} else {
			targ1.className='';
			targ2.className='hidden';
		}
		return false;
	}
}


function showHide(targ) {
	if (document.getElementById) {
		targ1 = document.getElementById("c_"+targ);
		targ2 = document.getElementById(targ).firstChild;
		if (targ1.className=='hidden') {
			targ1.className='shownInline';
			targ2.title = 'Weinporträt ausblenden';
		} else {
			targ1.className='hidden';
			targ2.title = 'Weinporträt einblenden';
		}
		//return false;
	}
}

function showNamedCopy() {
	if (window.location.hash&&window.location.hash!="#pyramide") {
		showHide(window.location.hash.substring(1));
	}
}

function accImgPopup(theURL,theW,theH) {
		if (typeof imgWin!='undefined') imgWin.close();
		var theT = ',top='+(Math.floor((screen.availHeight-eval(theH)-10)/2));
		var theL = ',left='+(Math.floor((screen.availWidth-eval(theW))/2));
		var features = 'width='+theW+',height='+theH+theT+theL;
		newWindow=window.open(theURL,'imgWin',features);
		newWindow.document.open();
		newWindow.document.write('<html><head><title>Weingut Rudloff</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><style>body{margin:0;padding:0;}</style></head><body onblur="self.close();">'); 
		newWindow.document.write('<a href="javascript:self.close();"><img src="'+theURL+'" width="'+theW+'" height="'+theH+'" galleryimg="no" id="theImg" border="0"></a>');
		newWindow.document.write('</body></html>');
		newWindow.document.close();
		if (window.focus) {newWindow.focus()}
		return false;
}

function formHiLite() {
	var f = document.forms[0];
	for(var i = 0; i < f.elements.length; i++) {
        var e = f.elements[i];
		if (e.type == "text" || e.type == "textarea" || e.type == "select-one") {
			e.onfocus = function() {this.style.borderColor='#C1273B'};
        	e.onblur = function() {this.style.borderColor='#DDDDDD'};
			}
    }
}
