if (typeof jQuery != 'undefined') {
	$(document).ready(function (){

		$("#flxPageLoadMessage").slideDown("fast", function (){
			setTimeout(function (){
				$("#flxPageLoadMessage").slideUp("fast");
			}, 3000);
		})

	});
}

function OpenPostCard(PostcardId, EntryId, Code) {
	window.open('/dcminc/postcard.php?PostcardId='+ PostcardId +'&EntryId=' + EntryId + '&Code=' + Code,'PostcardWin','width=700, height=500');
}
function OpenComments(newsItemId) {
	arrPos = getCenterPos(500,500);
	window.open('/dcminc/comments.php?newsItemId='+ newsItemId,'Commentwin','width=500, height=500, scrollbars=yes, left=' + arrPos[0] + ',top='+arrPos[1]);
}

function PopUp(url, width, height, extra) {
	if (extra!='') {
		extra = ', ' + extra;
	}
	window.open(url, 'DCMPOP','width=' + width + ', height='+ height + extra);
}

function getCenterPos(w,h) {
	var wh = screen.Height;
	var ww = screen.Width;
    leftPos = Math.round((ww-w-10)/2);
    topPos = Math.round((wh-h-29)/2);
	return new Array(leftPos,topPos);
}
