function PopupPic(str)
{
 window.open(str,'','top=0, left=50, scrollbars=1, resizable=1, width=650, height=480');
}

function openW(sPicURL) {
 window.open( "popup.htm?"+sPicURL, "",  "top= "+(screen.height - 200)/2+" , left= "+(screen.width - 200)/2+ " , resizable=1,HEIGHT=200,WIDTH=200");
}

function showModal(sPicURL,w,h) {
 window.open(sPicURL, "",  "top= "+(screen.height - h)/2+" , left= "+(screen.width - w)/2+ " , resizable=1,HEIGHT="+h+",WIDTH="+w);
}

function for_print()
{
	var i = document.getElementById("td_content");
	var html = i.innerHTML;
	document.open();
	document.write(html);
}
/**
 * createHTTPXMLRequest
 * @param {type}  
 */
function createHTTPXMLRequest() {			
var xmlHttp = false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
try {
  xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
  try {
    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (e2) {
    xmlHttp = false;
  }
}
@end @*/

if (!xmlHttp && typeof XMLHttpRequest != 'undefined') {
  xmlHttp = new XMLHttpRequest();
} 	
}

function updatePage(elementid) {
  if (xmlHttp.readyState == 4) {
    var response = xmlHttp.responseText;
    document.getElementById(elementid).value = response;
  }
}

function sendRequest(uri,elementid) {
  xmlHttp = createHTTPXMLRequest();
  
  xmlHttp.open("GET", uri, true);

  xmlHttp.onreadystatechange = updatePage;  

  xmlHttp.send(elementid);
}
 
