// Java Document
$(document).ready(function(){
	/***********************************************************************************************
	HEADER LOAD COMPLETE
	***********************************************************************************************/	
	//articleId = parseInt($('#t1-desc1').find('li:nth-child(7)').text()); 
	articleId = parseInt($('#aticleinfo').find('li:nth-child(7)').text()); 
	atpage    = parseInt($('#aticleinfo').find('li:nth-child(2)').text());
	atsubmenu = parseInt($('#aticleinfo').find('li:nth-child(3)').text());
		
	//$.removeBackground();
	
	
	$(function(){ $(document).pngFix( { blankgif:'images/clear.gif' } ); });
		
	/***********************************************************************************************
	Event Expand X of Image Crown
	***********************************************************************************************/
		/* Start comment */
	//$('#commentforms-box').slideUp();
	//$('#listarea').commentsList(articleId, 0, 0, 0, 0, 0);
	
	
	/***********************************************************************************************
	EVENT FUNCTION BUTTON
	***********************************************************************************************/			
	//$('#txtsizetop').click(function()      { $(this).txtresize();           });
	//$('#contributetop').click(function()   { $(this).Contribute(articleId); });
	//$('#rsstop').click(function()          { $(this).RSSFEED(articleId);    });
	//$('#3columntop').click(function()      { $(this).TreeColumn();          });
	
	//$('#txtsizebottom').click(function()   { $(this).txtresize();           });
	//$('#contributebottom').click(function(){ $(this).Contribute(articleId); });
	//$('#rssbottom').click(function()       { $(this).RSSFEED(articleId);    });
	//$('#3columnbottom').click(function()   { $(this).TreeColumn();          });
	
	$('#printf').click(function() { $(this).printf('T2'); });
	//$('#printf2').click(function(){ $(this).printf('T3'); });
	//$('#printf3').click(function(){ $(this).printf('T3'); });

	
	
	/***********************************************************************************************
	EVENT DISPLAY COMMENT
	***********************************************************************************************/	
	
	
	
		/***********************************************************************************************
	Load position 
	***********************************************************************************************/
	/*var fixbrandoffset = $('div#fixbrand').offset();	 	
	var fixbrandtop    = (fixbrandoffset.top  + 30)  + 'px';
	var fixbrandleft   = (fixbrandoffset.left + 30) + 'px';
	
	if(!isNone(fixbrandtop) && !isNone(fixbrandleft)){
		$('div#groupbrand').css({ 'top':fixbrandtop, 'left':fixbrandleft });
		$('div#groupbrand').css({ 'display':'block' });
	}*/
		
	calculatorWindow();
	
	 
});


function calculatorWindow(){
/*	var fixbrandoffset = $('div#fixbrand').offset();	 	
	var fixbrandtop    = (fixbrandoffset.top  + 30) + 'px';
	var fixbrandleft   = (fixbrandoffset.left + 30) + 'px';*/
		
/*	if(!isNone(fixbrandtop) && !isNone(fixbrandleft))
		$('div#groupbrand').css({ 'top':fixbrandtop, 'left':fixbrandleft });
*/
	var commentp1offset = $('div#usrcomments').offset();	 	
	var commentp1top    = (commentp1offset.top  + 5) + 'px';
	var commentp1left   = (commentp1offset.left + 5) + 'px';
		
	if(!isNone(commentp1top) && !isNone(commentp1left))
		$('div#comments-pic1').css({ 'top':commentp1top, 'left':commentp1left });

	setTimeout("calculatorWindow()", 500);
}

