// JScript source code
function PrintPopup(appPath, submitString)
{
	var generator=window.open('','Print','height=600,width=700, resizable=1, scrollbars=1,toolbar=0, menubar=0');
	var htmlText;
	generator.document.write('<html><head><title>Print</title>');
	generator.document.write('<link rel="stylesheet" type="text/css" href="PrintStylesheet.css" />');
	generator.document.write('<LINK href="Table.css" type="text/css" rel="stylesheet"/>');
	generator.document.write('</head><body>');
	htmlText="";
	
	
	try{
		htmlText+=RemoveTag(document.getElementById('ContentPane').innerHTML, 'img');
	}
	catch(err)
	{
		
	}
	htmlText+="<br/><hr/><div class='footer' align='center'><font color='#999999' size='1'>&reg; Vojvodina Investment Promotion Fund - VIP Fund 2006, all rights reserved <br/>www.vip.org.rs</font></div>";
	while(htmlText.indexOf("href=")!= -1)
	{
		htmlText=htmlText.replace("href=", "");
	}
	
	htmlText=RemoveTag(htmlText, 'input');
	htmlText=RemoveTag(htmlText, 'select');
	htmlText=RemoveExpr(htmlText, 'bgcolor=("|"#|#|\'|\'#)*[0-9a-zA-Z]*("|\')*');//remove bg color
	htmlText=RemoveExpr(htmlText, '<a[^>]*?>'+submitString+'</a>');//remove link buttons
	generator.document.write("<table height='60'  width='100%' border='0'><tbody><tr><td width='60' rowspan='2'><img alt='' src='" +appPath+ "/images/head/viplogo.gif' /></td><td style='width: 450px'><span class='SiteTitle'>Vojvodina Investment Promotion Fund</span></td><td align='right'><a href='javascript:window.print()' />Print This Page</a></td></tr><tr><td colspan='2'><span class='SiteSubTitle'>Fond za podr&scaron;ku investicija u Vojvodini</span></td></tr></tbody></table><br /> <hr/><br/>");
	generator.document.write(htmlText);
	
	generator.document.write('</body></html>');
	  
	generator.document.close();
}


function RemoveTag(Text, tagName )
{
	var oRegex = new RegExp('<'+tagName+'(.*?)<\/'+tagName+'>', 'i') ;
	var oMatch = oRegex.exec(Text) ;
	while(oMatch)
	{
		Text= Text.replace(oRegex, '');
		oMatch = oRegex.exec(Text) ;

	}
	
	oRegex = new RegExp('<'+tagName+'(.*?)>', 'i') ;
	oMatch = oRegex.exec(Text) ;
	while(oMatch)
	{
		Text= Text.replace(oRegex, '');
		oMatch = oRegex.exec(Text) ;

	}
	return Text;
}


function RemoveExpr(Text, Expr)
{
	var oRegex = new RegExp(Expr, 'i') ;
	var oMatch = oRegex.exec(Text) ;
	while(oMatch)
	{
		Text= Text.replace(oRegex, '');
		oMatch = oRegex.exec(Text) ;

	}
	return Text;
}