///////////////////////////////////////////////////////////////////////////////
function ViewDocMedia(sPath, sMode)
///////////////////////////////////////////////////////////////////////////////
{	
	var sStaticPath = "http://sendeyolla.hurriyet.com.tr"

	switch (sMode)
	{
		case "gif" :
		case "GIF" :
		case "jpg" :
		case "JPG" :
		case "JPEG" :
		case "jpeg" :
//			imgwin = window.showModelessDialog("",this,"status=no;help=no;center=yes;resizable=yes;dialogwidth=450px;dialogheight=400px");
			imgwin = window.open("","","edge=Raised,scrollbars=yes,status=no,help=no,center=yes,resizable=yes,width=200,height=200");
			imgwin.document.open();
			imgwin.document.writeln("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
			imgwin.document.writeln("<html>");
			imgwin.document.writeln("<head>");
			imgwin.document.writeln("<meta http-equiv=\"Content-Language\" content=\"TR\">");
			imgwin.document.writeln("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1254\">");
			imgwin.document.writeln("<meta http-equiv=\"Keywords\" content=\"\">");
			imgwin.document.writeln("<title>Sen de yolla</title>");
			imgwin.document.writeln("<link href=\"styles/admin.css\" rel=\"stylesheet\" type=\"text/css\">");
			imgwin.document.writeln("<script type=\"text/javascript\">");
			imgwin.document.writeln("function sizeWin() {");

			imgwin.document.writeln("iw = document.body.clientWidth;")
			imgwin.document.writeln("ih = document.body.clientHeight;")
			imgwin.document.writeln("w = document.all.dynImg.width - iw;")
			imgwin.document.writeln("h = document.all.dynImg.height - ih;")			
//			imgwin.document.writeln("alert(h + ' ' +  ih + ' ' +  window.screen.availHeight)")
			imgwin.document.writeln("window.resizeBy(w, h+5);")
//			imgwin.document.writeln("window.resizeBy(w+60, h-10);")
			imgwin.document.writeln("window.moveTo(0, 0);")
			imgwin.document.writeln("self.focus();")
			imgwin.document.writeln("}");
			imgwin.document.writeln("</script>");
			imgwin.document.writeln("</head>");
			imgwin.document.writeln("<body onload=\"sizeWin();\" bgcolor=\"#FFFFFF\" text=\"#000000\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">");
			imgwin.document.writeln("<table id=\"layout\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
			imgwin.document.writeln("<tr>");
			imgwin.document.writeln("<td align=\"center\"><img width=\"400px\" id=\"dynImg\" src=\"" + sPath + "\"></td>");
			imgwin.document.writeln("</tr>");			
			imgwin.document.writeln("</table>");
			imgwin.document.writeln("</body>");
			imgwin.document.writeln("</html>");
			imgwin.document.close();
			imgwin = null;
			break;
		
		default :
			window.open(sPath , '', "toolbar=0,status=1,menubar=0,resizable=1,scrollbars=1,width=400px,height=400px");
	}
}
///////////////////////////////////////////////////////////////////////////////
function ViewDocMediaFree(sPath, sMode)
///////////////////////////////////////////////////////////////////////////////
{	
	var sStaticPath = "http://sendeyolla.hurriyet.com.tr"

	switch (sMode)
	{
		case "gif" :
		case "GIF" :
		case "jpg" :
		case "JPG" :
		case "JPEG" :
		case "jpeg" :
//			imgwin = window.showModelessDialog("",this,"status=no;help=no;center=yes;resizable=yes;dialogwidth=450px;dialogheight=400px");
			imgwin = window.open("","","edge=Raised,scrollbars=yes,status=no,help=no,center=yes,resizable=yes,width=200,height=200");
			imgwin.document.open();
			imgwin.document.writeln("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
			imgwin.document.writeln("<html>");
			imgwin.document.writeln("<head>");
			imgwin.document.writeln("<meta http-equiv=\"Content-Language\" content=\"TR\">");
			imgwin.document.writeln("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1254\">");
			imgwin.document.writeln("<meta http-equiv=\"Keywords\" content=\"\">");
			imgwin.document.writeln("<title>Sen de yolla</title>");
			imgwin.document.writeln("<link href=\"styles/admin.css\" rel=\"stylesheet\" type=\"text/css\">");
			imgwin.document.writeln("<script type=\"text/javascript\">");
			imgwin.document.writeln("function sizeWin() {");

			imgwin.document.writeln("iw = document.body.clientWidth;")
			imgwin.document.writeln("ih = document.body.clientHeight;")
			imgwin.document.writeln("w = document.all.dynImg.width - iw;")
			imgwin.document.writeln("h = document.all.dynImg.height - ih;")			
//			imgwin.document.writeln("alert(h + ' ' +  ih + ' ' +  window.screen.availHeight)")
			imgwin.document.writeln("window.resizeBy(w, h+5);")
//			imgwin.document.writeln("window.resizeBy(w+60, h-10);")
			imgwin.document.writeln("window.moveTo(0, 0);")
			imgwin.document.writeln("self.focus();")
			imgwin.document.writeln("}");
			imgwin.document.writeln("</script>");
			imgwin.document.writeln("</head>");
			imgwin.document.writeln("<body onload=\"sizeWin();\" bgcolor=\"#FFFFFF\" text=\"#000000\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">");
			imgwin.document.writeln("<table id=\"layout\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
			imgwin.document.writeln("<tr>");
			imgwin.document.writeln("<td align=\"center\"><img id=\"dynImg\" src=\""  + sPath + "\"></td>");
			imgwin.document.writeln("</tr>");			
			imgwin.document.writeln("</table>");
			imgwin.document.writeln("</body>");
			imgwin.document.writeln("</html>");
			imgwin.document.close();
			imgwin = null;
			break;
		
		default :
			window.open(sPath , '', "toolbar=0,status=1,menubar=0,resizable=1,scrollbars=1,width=400px,height=400px");
	}
}