
function selectCategory(frm)
{

if(frm==-1)
{
	

	document.Form1.action=document.Form1.categorSelect.options[document.Form1.categorSelect.selectedIndex].value;
	
	document.Form1.submit();
}
else
{

  fnpopupWin(frm);
}

}





function fnpopupWin(iIndex)
{


  numWidth=630;
  numHeight=510;

numPosY = (screen.availWidth - numWidth ) / 2;
numPosX  = (screen.availHeight - numHeight ) / 2;


strProp = "status=no,resize=yes,screenX="+numPosX+",screenY="+numPosY+",top="+numPosX+",left="+numPosY+",toolbar=no,scrollbars=yes,width="+numWidth+",height="+numHeight+",maximize=null";


var agt=navigator.userAgent.toLowerCase();
var is_mac    = (agt.indexOf("mac")!=-1);
var strSizeType = '';
var pvwimagedesc='';
var dldlibimg='';
var closeWindowLink='';


	

if((document.getElementById("txtPvwImageDownloadSize"+iIndex).value != '')||
	(document.getElementById("txtPvwImageDownloadType"+iIndex).value != ''))
{
   strSizeType = '('+document.getElementById("txtPvwImageDownloadSize"+iIndex).value + '  ' + document.getElementById("txtPvwImageDownloadType"+iIndex).value + ')';
}
	
if(document.getElementById("txtPvwImageDesc"+iIndex).value != '')
{
	pvwimagedesc= '<p class="imgIntrotxt">'+(document.getElementById("txtPvwImageDesc"+iIndex).value)+'</p>';	
}
if(document.getElementById("txtPvwDownloadText"+iIndex).value != '')
{

dldlibimg ='<a class="outerlink"  target="_blank" href="'+(document.getElementById("download_image"+iIndex).value)+'">&nbsp;<IMG SRC="/global/images/webarrow.gif" align="bottom" BORDER=0 ALT="pixel.gif">&nbsp;&nbsp;'+(document.getElementById("txtPvwDownloadText"+iIndex).value)+strSizeType+'</a>';

}
if(document.getElementById("txtPvwCloseText"+iIndex).value != '')

{
closeWindowLink='<a class="redlink" href="#" onclick="window.close();">&nbsp;<IMG SRC="/global/images/webarrow.gif"  BORDER=0 ALT="pixel.gif" align="bottom">&nbsp;&nbsp;'+(document.getElementById("txtPvwCloseText"+iIndex).value)+'</a>';
}

strPopWintxt='\n';

strPopWintxt=strPopWintxt+'<HTML> \n';
strPopWintxt=strPopWintxt+'<HEAD> \n';
strPopWintxt=strPopWintxt+'<TITLE> '+ (document.getElementById("txtPvwImageHeading"+iIndex).value)+'</TITLE> \n';

if (is_mac) 
	{
		strPopWintxt=strPopWintxt+'<link rel="stylesheet" type="text/css" href="/global/includes/styles/ADICORP2_pc_mac.css">\n';
	}
	else
	{

		strPopWintxt=strPopWintxt+'<link rel="stylesheet" type="text/css" href="/global/includes/styles/ADICORP2_pc_ie.css">\n';
	}

strPopWintxt=strPopWintxt+'</HEAD> \n';

strPopWintxt=strPopWintxt+'<BODY class="nomargin"> \n';
strPopWintxt=strPopWintxt+'<table border="0"  cellspacing="0"   cellpadding="0"> \n';
strPopWintxt=strPopWintxt+'<tr> \n';
strPopWintxt=strPopWintxt+'	<td > ';
strPopWintxt=strPopWintxt+'		<IMG SRC="/global/images/pixel.gif" WIDTH="7px" height="50px"> ';
strPopWintxt=strPopWintxt+'	</td> \n';
strPopWintxt=strPopWintxt+'<td colspan=2 valign="middle"> \n';
strPopWintxt=strPopWintxt+'<IMG SRC="/global/images/as_logo_klein.gif"  BORDER=0 ALT=""> \n';
strPopWintxt=strPopWintxt+'</td> \n';
strPopWintxt=strPopWintxt+'</tr> \n';
strPopWintxt=strPopWintxt+'<tr> \n';
strPopWintxt=strPopWintxt+'	<td > ';
strPopWintxt=strPopWintxt+'		<IMG SRC="/global/images/pixel.gif" WIDTH="20px" > ';
strPopWintxt=strPopWintxt+'	</td> \n';
strPopWintxt=strPopWintxt+'	<td > \n';
strPopWintxt=strPopWintxt+'		<IMG SRC="'+(document.getElementById("pvw_lib_image"+iIndex).value)+'"  BORDER=0 ALT=""> \n';
strPopWintxt=strPopWintxt+'	</td> \n';
strPopWintxt=strPopWintxt+'<td valign="top"> \n';
strPopWintxt=strPopWintxt+'		<table border="0"  cellspacing="0" cellpadding="0"> \n';
strPopWintxt=strPopWintxt+'				<tr> \n';

strPopWintxt=strPopWintxt+'					<td rowspan="5" width="14px"> ';
strPopWintxt=strPopWintxt+'						<IMG SRC="/global/images/pixel.gif" width="14px"  BORDER="0" ALT="pixel.gif"> ';
strPopWintxt=strPopWintxt+'					</td> \n';

strPopWintxt=strPopWintxt+'					<td > \n';
strPopWintxt=strPopWintxt+'						<h3>'+(document.getElementById("txtPvwImageHeading"+iIndex).value)+'</h3> \n';
strPopWintxt=strPopWintxt+'					</td> \n';
strPopWintxt=strPopWintxt+'					<td rowspan="5" width="14px"> ';
strPopWintxt=strPopWintxt+'						<IMG SRC="/global/images/pixel.gif" width="14px"  BORDER="0" ALT="pixel.gif"> ';
strPopWintxt=strPopWintxt+'					</td> \n';

strPopWintxt=strPopWintxt+'				</tr> \n';
strPopWintxt=strPopWintxt+'				<tr> \n';
strPopWintxt=strPopWintxt+'					<td > \n';
strPopWintxt=strPopWintxt+'						<h6>'+(document.getElementById("txtPvwImageSubheading"+iIndex).value)+'</h6> \n';
strPopWintxt=strPopWintxt+'					</td> \n';

strPopWintxt=strPopWintxt+'				</tr> \n';

strPopWintxt=strPopWintxt+'				<tr> \n';
strPopWintxt=strPopWintxt+'					<td > \n';
strPopWintxt=strPopWintxt+'					'+pvwimagedesc+'	 \n';
strPopWintxt=strPopWintxt+'					</td> \n';

strPopWintxt=strPopWintxt+'				</tr> \n';
strPopWintxt=strPopWintxt+'				<tr> \n';
strPopWintxt=strPopWintxt+'					<td > \n';

strPopWintxt=strPopWintxt+'						'+dldlibimg+'\n';
strPopWintxt=strPopWintxt+'					</td> \n';

strPopWintxt=strPopWintxt+'				</tr> \n';
strPopWintxt=strPopWintxt+'				<tr> \n';
strPopWintxt=strPopWintxt+'					<td > ';
strPopWintxt=strPopWintxt+'						 '+closeWindowLink+'\n';
strPopWintxt=strPopWintxt+'					</td> \n';

strPopWintxt=strPopWintxt+'				</tr> \n';
strPopWintxt=strPopWintxt+'				</table> \n';
strPopWintxt=strPopWintxt+'	</td> \n';
strPopWintxt=strPopWintxt+'</tr> \n';

strPopWintxt=strPopWintxt+'</table> \n';
strPopWintxt=strPopWintxt+'</BODY> \n';
strPopWintxt=strPopWintxt+'</HTML> \n';

newWindow = window.open('','',strProp);
newWindow.document.write(strPopWintxt);

}  
