﻿function SetModalRatingPosition()
{
	var Blck = $('MdlRating');
    var heightVP = document.viewport.getHeight();
    var widthVP  =document.viewport.getWidth();
    var sOff= document.viewport.getScrollOffsets();

    var DivAllH= heightVP + sOff.top;
    var DivAllV= widthVP + sOff.left;

	if( window.innerHeight && window.scrollMaxY ){
		// Firefox 
		DivAllH = window.innerHeight + window.scrollMaxY;
	}
	else if(document.body.scrollHeight > document.body.offsetHeight )
	// all but Explorer Mac
	{
		DivAllH = document.body.scrollHeight;
	}
	else
	{
		// works in Explorer 6 Strict, Mozilla (not FF) and Safari 
		DivAllH = document.body.offsetHeight + document.body.offsetTop; 
	}

    var widthBody = Element.getWidth($(document.body));
    if (widthVP<widthBody ) DivAllV= widthBody;
    


	var modTop= document.viewport.getScrollOffsets().top + 150 + 'px';
	Blck.style.height="200px";
	Blck.style.top=modTop;
	
	
	Element.setStyle($('MdlOpacityRating'),{display:'block',visibility:'visible',height:DivAllH+'px',width:DivAllV+'px',top:0,left:0});
	
	
	$('ModalContainerRating').show();
	
	$$('select', 'object', 'embed').each(function(node){ node.style.visibility = 'hidden' });

}
function HideModalRatingProduct()
{
	$$('select', 'object', 'embed').each(function(node){ node.style.visibility = 'visible' });
    $('ModalContainerRating').hide();
}