<{include file="db:`$dirname`_header.html"}>

<div id="<{$dirname}>PrivateIndexCheckedHandler" style="display: none;"></div>

<h4><{$smarty.const._MD_XOONIPS_ITEM_REGISTER_ITEM_TITLE}></h4>

<form id="<{$dirname}>_registertopform" name="<{$dirname}>_registertopform" action="<{$next_url}>" method="post">
<input id="<{$dirname}>_url" type="hidden" name="url" value="" />
<input id="<{$dirname}>_redirect_msg" type="hidden" name="redirect_msg" value="" />

<div style="text-align: center">
	<input id="<{$dirname}>_selectitemtypebutton" type="button" href="register.php?op=selectItemtype" rel="SelectItemTypePrettyPopin" value="<{$smarty.const._MD_XOONIPS_ITEM_REGISTER_BUTTON_LABEL}>">
</div>
</form>
<script type="text/javascript" charset="utf-8">
jQuery.noConflict();
jQuery(function(){
	jQuery('#<{$dirname}>_registertopform :button[rel^="SelectItemTypePrettyPopin"]').prettyPopin({
		width : 800, /* false/integer */
		height: 600, /* false/integer */
		close : false, /* true/false */
		opacity: 0.5, /* value from 0 to 1 */
		animationSpeed: '0', /*
		slow/medium/fast/integer */
		followScroll: true, /* true/false */
		loader_path: './images/loader.gif', /* path to your loading image */
		overflow : 'scroll',
		draggable : false,
		divname : 'prettyPopin1',
		internalname : '<{$dirname}>_registerform',
		dirname : '<{$dirname}>',
		callback: xoonipsCallback
	});
});
function xoonipsCallback(id, value) {
	if (id != null) {
		var form = jQuery('#<{$dirname}>_registertopform');
		jQuery('#<{$dirname}>_url').val(id);
		jQuery('#<{$dirname}>_redirect_msg').val(value);
		form.attr('action', 'register.php?op=finish');
		form.submit();
	}
	return false;
}
function autoClick() {
	jQuery('#<{$dirname}>_selectitemtypebutton').click();
}
if (window.attachEvent){
	window.attachEvent('onload', autoClick);
} else {
	window.addEventListener('load', autoClick, false);
}
</script>
<{include file="db:`$dirname`_footer.html"}>
