/*New script*/
// Big Images
var xPos,yPos;
xPos = 0;
yPos = 0;
var HIDDEN = (isNS) ? 'hide' : 'hidden';
var VISIBLE = (isNS) ? 'show' : 'visible';
var isNS = (navigator.appName == "Netscape" && parseInt(navigator.appVersion) >= 4);
function testIsValidObject(objToTest)
{
	if (null == objToTest)
	{
		return false;
	}
	if ("undefined" == typeof(objToTest) ) 
	{
		return false;
	}
	return true;
}

function pos(imgNormal)
{
	if (testIsValidObject(document.images[imgNormal]))
	{ 
		 imgElem = document.images[imgNormal];
		if(isNS)
		{
			xPos = eval(imgElem).x;
			yPos = eval(imgElem).y;
		}
		else
		{
			xPos = eval(imgElem).offsetLeft;
			tempEl = eval(imgElem).offsetParent;
			while (tempEl != null)
			{
				xPos += tempEl.offsetLeft;
				tempEl = tempEl.offsetParent;
			}
			yPos = eval(imgElem).offsetTop;
			tempEl = eval(imgElem).offsetParent;
			while (tempEl != null)
			{
				yPos += tempEl.offsetTop;
				tempEl = tempEl.offsetParent;
			}
			yPos = yPos + 65;
			xPos = xPos - 25;
		}
	}
}
 
function showObject(imgNormal,imgBig,object)
{
	var imgNormal = (imgNormal == null) ? 'img_normal' : imgNormal;
    var imgBig	 = (imgBig == null) ? 'bigimage' : imgBig;
    var object	 = (object == null) ? 'article_img_enlarge' : object;
	pos(imgNormal);
	var lft,tp;
	if (testIsValidObject(document.images[imgNormal]))
	{ 
		w1 = document.images[imgNormal].width;//Normal Image
		w2 =  345;
		w3 = document.images[imgBig].width;//Enlarged Image
		if ((w3-w1) >0)
		{
			lft =xPos-(w3-w1)+80;
		}
		else
		{
			lft = xPos+80;
		}
		tp = yPos;
		document.getElementById(object).style.left = lft;
		document.getElementById(object).style.top = tp-100;
		document.getElementById(object).style.borderColor = 'red';
		document.getElementById(object).style.visibility = VISIBLE;
	}
}
 
function hideObject(object)
{
	var object	 = (object == null) ? 'article_img_enlarge' : object;
	document.getElementById(object).style.visibility = HIDDEN;
}

function showObject1(imgNormal,imgBig,object)
{
	var imgNormal = (imgNormal == null) ? 'img_normal' : imgNormal;
    var imgBig	 = (imgBig == null) ? 'bigimage' : imgBig;
    var object	 = (object == null) ? 'article_img_enlarge' : object;
	pos(imgNormal);
	var lft,tp;
	if (testIsValidObject(document.images[imgNormal]))
	{ 
		w1 = document.images[imgNormal].width;//Normal Image
		w2 =  345;
		w3 = document.images[imgBig].width;//Enlarged Image
		if ((w3-w1) >0)
		{
			lft =xPos-75; //xPos-(w3-w1)+50;
		}
		else
		{
			lft = xPos-75; //xPos+50;
		}
		tp = yPos;
		document.getElementById(object).style.left = lft;
		document.getElementById(object).style.top = tp-70;
		document.getElementById(object).style.borderColor = 'red';
		document.getElementById(object).style.visibility = VISIBLE;
	}
}
//end big images
