
function checkStyleSheetRule(sheet,rule)
{
	if(rule.style.top!='' && rule.style.bottom!='')
	{
		var top=parseInt(rule.style.top);
		var bottom=parseInt(rule.style.bottom);
		var vh='document.body.clientHeight - '+bottom+'-'+top+' + "px"';
		sheet.addRule(rule.selectorText,'position:absolute; height: expression('+vh+');');
	}
	if(rule.style.left!='' && rule.style.right!='')
	{
		var left=parseInt(rule.style.left);
		var right=parseInt(rule.style.right);
		var vw='document.body.clientWidth- '+right+'-'+left+' + "px"';
		sheet.addRule(rule.selectorText,'width: expression('+vw+');');
	}
}

function checkStyleSheet(sheet)
{
	var n=sheet.rules.length;
	for(var i=0;i<n;i++)
		checkStyleSheetRule(sheet,sheet.rules[i]);
}

function checkStyleSheets()
{
	for(var i=0;i<document.styleSheets.length;i++)
		checkStyleSheet(document.styleSheets[i]);
}

function hackCss()
{
	return navigator.appVersion.indexOf('MSIE 6.0')>0;
}

if(hackCss())
	checkStyleSheets();

