function offer_open( id, typ, on, ip, c ){
	
	//var url = 'det' + 'ails.php?id=' + id + '&typ=' + typ + '&on=' + on + '&ip=' + ip + '&c=' +  c;
	var url = '/praca-oferty/' + id + '_' + typ + '_' + on + '_' + ip + '_' +  c + '.html';
	
	window.open( url, '_blank', 'toolbar,location,menubar,status,scrollbars,resizable' );	
	
}

function szczegoly_oferty_pracy( id, typ, on, ip, c ){
	
	//var url = 'det' + 'ails.php?id=' + id + '&typ=' + typ + '&on=' + on + '&ip=' + ip + '&c=' +  c;
	var url = '/oferty-pracy/' + id + '_' + typ + '_' + on + '_' + ip + '_' +  c + '.html';
	
	window.open( url, '_blank', 'toolbar,location,menubar,status,scrollbars,resizable' );	
	
}

function count_view( site, region, ads ){

	img = new Image(1,1);
	img.src = '/stats.php?site=' + site + '&time=' + (new Date()).getTime() + '&region=' + region + '&ads=' + ads;
	//document.write('<im' + 'g src="/stats.php?site=' + site + '&time=' + (new Date()).getTime() + '" width="0" heigh="0" border="0" ' + '/>');
}

function print_pz(){

	document.getElementById('tags_oferty_pracy').style.display = 'none';
	document.getElementById('tags_praca_za_granica').style.display = 'block';
	
	document.getElementById('jobleer_search_form_inner_pp').style.display = 'none';
	document.getElementById('jobleer_search_form_inner_pz').style.display = 'block';
	document.getElementById('kwpz').value = document.getElementById('kwpp').value;
	objects["suggTop_pz"].config({'idDiv':'txtHint_div_pz','idQuery':'kwpz','siteQ':'sug.php','parQ':'q','form':'search_form_pz','classDiv': 'txtHint_pz','classDivVal':'name','classDivInfo':'number','roundS':1,'hideInfo':0,'drawDown':1});

}

function print_pp(){

	//document.getElementById('tags_oferty_pracy_praca_za_granica').style.background = '#e9f3e1';
	
	document.getElementById('tags_oferty_pracy').style.display = 'block';
	document.getElementById('tags_praca_za_granica').style.display = 'none'
	
	document.getElementById('jobleer_search_form_inner_pz').style.display = 'none';
	document.getElementById('jobleer_search_form_inner_pp').style.display = 'block';
	document.getElementById('kwpp').value = document.getElementById('kwpz').value;
	objects["suggTop_pp"].config({'idDiv':'txtHint_div_pp','idQuery':'kwpp','siteQ':'sug.php','parQ':'q','form':'search_form_pp','classDiv': 'txtHint_pp','classDivVal':'name','classDivInfo':'number','roundS':1,'hideInfo':0,'drawDown':1});

}	

function hide_confirm (warstwa) {
	document.getElementById(warstwa).style.display="none";
	document.getElementById(warstwa).style.visibility="hidden";
}

function show_confirm (warstwa, w, h) {
	
	var wi, hi;
	if( w ) wi = parseInt(w);
	else wi = parseInt(300/2);
	if( h ) hi = parseInt(h);
	else hi = parseInt(130/2);
	
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' ) {
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	} else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	} else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}
	
	var scrOfX = 0, scrOfY = 0;
	if( typeof( window.pageYOffset ) == 'number' ) {
		scrOfY = window.pageYOffset;
		scrOfX = window.pageXOffset;
	} else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
		scrOfY = document.body.scrollTop;
		scrOfX = document.body.scrollLeft;
	} else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		scrOfY = document.documentElement.scrollTop;
		scrOfX = document.documentElement.scrollLeft;
	}

	
	myWidth = parseInt(myWidth / 2) - wi + scrOfX;
	myHeight = parseInt(myHeight / 2) - hi + scrOfY;
	//alert('w:'+myWidth+' h:'+myHeight);

	document.getElementById(warstwa).style.left=myWidth+'px';
	document.getElementById(warstwa).style.top=myHeight+'px';
	document.getElementById(warstwa).style.display="block";
	document.getElementById(warstwa).style.visibility="visible";
	
	return true;

}

function checkEnter(oEvent)
{
	//alert('alert1');

	if (oEvent && oEvent.keyCode)
		iAscii = oEvent.keyCode;
	else if (oEvent && oEvent.which)
		iAscii = oEvent.which;
	else
		return false;

	if (iAscii == 13)
	{
		return true;
	}else{
		return false;
	}

}

	
