// pop up script -- start //
var sUserAgent = navigator.userAgent.toLowerCase();
var isOp = (sUserAgent.indexOf('opera')!=-1)?true:false;
function pop(oAnchor,sProps,sWindow){
	var sUrl = '';
	if(oAnchor.getAttribute) sUrl = oAnchor.getAttribute('href');
	if(sUrl=='') sUrl = oAnchor.href;
	if(sUrl=='') return true;
	var sWindowName = sWindow?sWindow:'reusedWindow';
	if(!sProps) sProps = null;
	
	// get digits out of passed props for width and height
	var sPropsdigits = new Array();
	sPropsdigits = sProps.match(/\d+/g); //returns the array [8,15]
	var pLeft = (screen.width - sPropsdigits[0])/2;
	var pTop = (screen.height - sPropsdigits[1])/2;
	
	// add left and top positions to sProps for centering window
	sProps += ', left = ' + pLeft + ',top=' + pTop;

	if(sUrl) var oPopup = window.open(sUrl,sWindowName,sProps);
	if(oPopup && !isOp) oPopup.focus();
	if(!oPopup){
		alert("Please disable your popup blocking software.");
	}
	return (oPopup)?false:true;
}
function switchImg(sImg,sSrc){
	oImg = document.images[sImg];
	return !(oImg.src = 'img/' + sSrc);
}
function verifyKey(oElement,oEvent){
	if(oEvent.keyCode==13 && oElement.onclick) oElement.onclick();
}
// pop up script -- end //

// show hide  - start //
function show(id)
{
     if (document.getElementById(id).style.display == 'none')
     {
          document.getElementById(id).style.display = 'block';
     }
}

function hide(id)
{
     if (document.getElementById(id).style.display == 'none')
     {
          document.getElementById(id).style.display = 'none';
     }
     else
     {
          document.getElementById(id).style.display = 'none';
     }
}
// show hide - end //