﻿var sthumb  = '';
var sclose = '';

function openImage(vLink,strAnh)
{
	
	if(strAnh == "AnhCongTy")
	{
		var new_height=315;
		var new_width=420;
	}
	else
	{
		var new_height=650;
		var new_width=700;
	}
	
	if(strAnh == "AnhCongTy")
		winDef = 'status=no,resizable=no,scrollbars=no,toolbar=no,location=no,fullscreen=no,titlebar=yes,height='.concat(new_height).concat(',').concat('width=').concat(new_width).concat(',');
	else
		winDef = 'status=no,resizable=no,scrollbars=yes,toolbar=no,location=no,fullscreen=no,titlebar=yes,height='.concat(new_height).concat(',').concat('width=').concat(new_width).concat(',');
	winDef = winDef.concat('top=').concat((screen.height - new_height)/2).concat(',');
	winDef = winDef.concat('left=').concat((screen.width - new_width)/2);
	newwin = open('', '_blank', winDef);
	
	newwin.document.writeln('<html><title>HOANG HA</title>');

	
	newwin.document.writeln('<script language=javascript>');

	newwin.document.writeln('function nrcIE(){');
	newwin.document.writeln('if (document.all){');
	newwin.document.writeln('return false;}}');

	newwin.document.writeln('function nrcNS(e){');
	newwin.document.writeln('if(document.layers||(document.getElementById&&!document.all)){');
	newwin.document.writeln('if (e.which==2||e.which==3){');
	newwin.document.writeln('return false;}}}');

	newwin.document.writeln('if (document.layers){');
	newwin.document.writeln('document.captureEvents(Event.MOUSEDOWN);');
	newwin.document.writeln('document.onmousedown=nrcNS;}');
	newwin.document.writeln('else{');
	newwin.document.writeln('document.onmouseup=nrcNS;');
	newwin.document.writeln('document.oncontextmenu=nrcIE;}');
	newwin.document.writeln('document.oncontextmenu=new Function("return false");');
	
	newwin.document.writeln('function disableselect(e){');
	newwin.document.writeln('return false}');
	
	newwin.document.writeln('function reEnable(){');
	newwin.document.writeln('return true}');

	newwin.document.writeln('document.onselectstart=new Function ("return false")');
	newwin.document.writeln('if (window.sidebar){');
	newwin.document.writeln('document.onmousedown=disableselect');
	newwin.document.writeln('document.onclick=reEnable}');

	newwin.document.writeln('\</script\>');

	
	newwin.document.writeln('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">');
	newwin.document.writeln('<table border="0" width=100% height=100%><tr><td align=middle valign=middle>');
	newwin.document.writeln('<a href="" onClick="window.close(); return false;"><img src="', vLink, '" alt="', sclose , '" border=0></a>');
	newwin.document.writeln('</td></tr></table>');
	newwin.document.writeln('</body></html>');	

}






