	
function rusure( location )
{
	var size_arr = askPageSize();
	
	var box_width =300;
	var box_height=100;
	
	var box_top   =(size_arr[3]-box_height)/2;
	var box_left  =(size_arr[2]-box_width)/2;
	
	var box = document.getElementById('ask_delete');
	
	box.style.position='absolute';
	box.style.left 	  = box_left+'px';
	box.style.top     = box_top+'px';
	box.style.width   = box_width+'px';
	box.style.height  = box_height+'px';


	if( cms_language == 1 )	var translate =  new Array( 'Czy na pewno chcesz usunąć ?'  , 'TAK' , 'NIE' );
					   else var translate =  new Array( 'Are you sure to delete ?' 		, 'YES' , 'NO'  );
	
	var HTML = '';
	
	HTML += '<div class="in" >';
	HTML += '	<div class="text" >'+translate[0]+'</div>';
	HTML += '	<div class="buttons" >';
	HTML += '		<a class="tak"  onclick="top.location = \''+location+'\'" >'+translate[1]+'</a>';
	HTML += '		<a class="nie" onclick="hide_ask_delete();"  		      >'+translate[2]+'</a>';
	HTML += '		<div style="clear:both;"></div>';
	HTML += '	</div>';
	HTML += '</div>';

	box.innerHTML = HTML;
	box.style.display = 'block';
}


//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --//

function hide_ask_delete()
{
	var box = document.getElementById('ask_delete');
	
	box.style.position='static';
	box.style.width   = '0 px';
	box.style.height  = '0 px';
	box.innerHTML 	  = '';
	box.style.display = 'none';
}

//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --//

function askPageSize(){
	
	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}

	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
	
//	alert( pageWidth );
//	alert( pageHeight );
//	alert( windowWidth );
//	alert( windowHeight );
	 
	return arrayPageSize;
}


//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --//


function myconfirm( location,message )
{
	question = confirm( message )
	
	if ( question != "0" )
	{
		top.location = location;
		return true;
	}
	else return false;
}
 