﻿function GotoUrl(strUrl,iOpenNew)
{
	if (parseInt(iOpenNew)>0){
		open(strUrl, '_blank', 'fullscreen=no,addressbar=yes,toolbar=yes,titlebar=yes,scrollbars=yes,status=yes,resizable=yes');
	}else{
		window.parent.location = strUrl;	
	}
}

function OpenImage(vLink,vWidth,vHeight)
{
	var sLink = (typeof(vLink.href) == 'undefined') ? vLink : vLink.href;

	if (sLink == '')
	{
		return false;
	}

	winDef = 'status=no,resizable=no,scrollbars=no,toolbar=no,location=no,fullscreen=no,titlebar=yes,height='.concat(vHeight).concat(',').concat('width=').concat(vWidth).concat(',');
	winDef = winDef.concat('top=').concat((screen.height - vHeight)/2).concat(',');
	winDef = winDef.concat('left=').concat((screen.width - vWidth)/2);
	newwin = open('', '_blank', winDef);

	newwin.document.writeln('<title>Image Preview</title><body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">');
	newwin.document.writeln('<img onclick="window.close()" src="', sLink, '" border=0>');
	newwin.document.writeln('</body>');

	if (typeof(vLink.href) != 'undefined')
	{
		return false;
	}
}

function ShowHideInfo(strID)
{
    var objtb = document.getElementById(strID)
    if(objtb.style.display =='none')
        objtb.style.display = 'block';
    else
        objtb.style.display = 'none';
}
