function show(id) {
	$(id).show();
}


function showDisp(id, howdisplay) {
    var obj = $(id);
    obj.style.display = howdisplay;
}


function hide(id) {
	$(id).hide();
}


function showInParent(div) {
	parent.$(div).show();
}


function hideInParent(div) {
	parent.$(div).hide();
}

function copyLogin(nr, linkPrefix, linkPostfix) {
	var linkOI = linkPrefix + $("loginOI" + nr).value + linkPostfix;
	$("linkOI" + nr).innerHTML = linkOI;
	$("inputHOI" + nr).value = linkOI;
	
	if ($("loginOI" + nr).value =='') {
		$("comOI" + nr).style.display = "none";
	} else {
		$("comOI" + nr).style.display = "block";
	}
}

//wyszarzenie wszystkiego na okolo
function graybg(){
	if(d.getElementById('graybg')) {
		d.body.removeChild(d.getElementById('graybg'));
	} else {
		var x = d.createElement('div');
		x.id='graybg';
		x.style.zIndex=2;
		x.style.backgroundColor='#000';
		x.style.opacity='.7';
		x.style.position='absolute';
		x.style.top=0;
		x.style.left=0;
		x.style.width=d.body.offsetWidth+'px';
		x.style.height=d.body.offsetHeight+'px';
		if (WP.isIE) x.style.filter='alpha(opacity=70)';
		d.body.appendChild(x);
	}
}

function showHidePopup() {
	graybg();
	$("loginOI").style.top = '300px';
	$("loginOI").style.left = ((d.body.offsetWidth-300)/2) + 'px';
	if ($("loginOI").style.display == "none") {
		$("loginOI").style.display = "block";
	} else {
		$("loginOI").style.display = "none";
	}
}
