// JavaScript Document

var d = document;
var winIE = (navigator.userAgent.indexOf("Opera")==-1 && (d.getElementById && d.documentElement.behaviorUrns)) ? true : false;

function bodySize()
{
	var a = d.getElementsByTagName("a");

	/*for(var i=0;i<a.length;i++) if(a[i].href == d.location.href) {
		a[i].href = "javascript:void(0);";
	} */
	if(winIE && d.documentElement.clientWidth) 
	{
		sObj = d.getElementsByTagName("body")[0].style;
		sObj.width = (d.documentElement.clientWidth<700) ? "700px" : "auto";
		
	}
}

function init()
{
	if(winIE) { bodySize(); }
}

if(winIE) { onload = init; }
if(winIE) { onresize = bodySize; }
 

 

/*
jQuery(document).ready(function(){
	jQuery("a[@href$=pdf]").wrap("<div class='pdf'></div>");
});
*/

function UpdateExpandWtBlock()
{
	var bw = jQuery(document).width();
	if (bw >=1000) jQuery('#idExpandButtonBlock').show();
	else jQuery('#idExpandButtonBlock').hide();

	//ExpandTable();
}

jQuery(document).ready(function(){  
	jQuery('a.b-email-friend').fancybox({
		'overlayShow': true, 
		'frameWidth': 250, 
		'frameHeight': 150
	}); 
	UpdateExpandWtBlock();
});

jQuery(window).resize(function(){
	UpdateExpandWtBlock();
});


function ExpandTable()
{
	var docWidth = parseInt(jQuery(document).width());
	//alert(docWidth);
	var	minWidth = parseInt(jQuery('#idWideTable').attr('rel'));	
	var width = minWidth + parseInt((docWidth-950)/2);
	//alert(width);
	jQuery('#idWideTable').css('width', width + 'px');
}
