function openWin(img,imgW,imgH,pleft,pbottom) 
{
    screen_height = window.screen.availHeight;
    screen_width = window.screen.availWidth;

    //imgH = parseInt(imgH) + 50;
    left_point = parseInt(screen_width/2)-(imgW/2); 
    top_point = parseInt(screen_height/2)-(imgH/2); 
	if(pleft==null)
		pleft = 0;
	if(pbottom == null)
		pbottom = 0;

    //winId=window.open("",'newWin','width=797,height=425,left='+left_point+',top='+top_point+',toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');
    winId=window.open("",'newWin','width='+imgW+',height='+imgH+',left='+left_point+',top='+top_point+',toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');
    //winId.document.write('<head><title>Image Enlarge</title></head>');
    winId.document.write('<title>Image Enlarge</title>');
    winId.document.write('<body style="margin-top:0px;margin-bottom:0px;margin-left:0px; margin-right:0px;" onLoad="if (window.focus) window.focus()">');
    winId.document.write('<table cellpadding="10" cellspacing="0" width="100%" border="12">');
    winId.document.write('<tr><td>');
    winId.document.write('<table cellpadding="1" cellspacing="1" width="100%" border="0">');
    winId.document.write('<tr>');
    winId.document.write('<td align="right"><A href="#" style="font-size:10px; color:#003F2D; font-family:verdana; font-weight:normal; text-decoration:none;" onclick="window.close();">Close Window [X]</a></td>')
    winId.document.write('</tr>');
    winId.document.write('<tr>');
    winId.document.write('<td align="left" style="padding-left:' + pleft + 'px; padding-bottom:' +  pbottom + 'px"><img src="images/logo.jpg" border="0"></td>')
    winId.document.write('</tr>');
    winId.document.write('<tr>');
    winId.document.write('<td align="left"><img src="' + img + '"></td>');
    winId.document.write('</tr>');
    //winId.document.write('<tr><td align="center"><A href="#" style="font-size:12px; color:#003F2D; font-weight:normal; text-decoration:none;" onclick="window.close();">Close Window</a></td></tr>');
    winId.document.write('</table>');
    winId.document.write('</td></tr>');
    winId.document.write('</table>');
    //winId.document.write('<img src="' + img + '">');
    winId.document.write('</body>');
    winId.document.close();
}

function SpecPopup(url,width,height)
{
    screen_height = window.screen.availHeight;
    screen_width = window.screen.availWidth;

    //imgH = parseInt(imgH) + 50;
    left_point = parseInt(screen_width/2)-(width/2); 
    top_point = parseInt(screen_height/2)-(height/2) - 20; 
    window.open(url,'newWin','width='+width+',height='+height+',left='+left_point+',top='+top_point+',toolbar=No,location=No,scrollbars=No,status=No,resizable=No,fullscreen=No');   
}

function openPrivatePolicyPage(url)
{
    screen_height = window.screen.availHeight;
    screen_width = window.screen.availWidth;
    window.open(url,'xyz','toolbar=yes,location=yes,addressbar=yes,menubar=yes,scrollbars=yes,status=yes,resizable=yes') ; //'left=0,top=0,toolbar=yes,location=yes,addressbar=yes,menubar=yes,scrollbars=yes,status=yes,resizable=yes')
}

function sendMeCatalog()
{
    window.open('FileDownload.aspx?downcatalog=yes','downwindow','width=0,height=0,left=-50,top=-50');   
}

function viewPicture(filename)
{
    screen_height = parseInt(window.screen.availHeight) -25;
    screen_width = window.screen.availWidth - 10;
    
    picwinID = window.open('','xyz','width='+ screen_width +',height='+ screen_height + ',top=0,left=0,toolbar=no,location=no,addressbar=no,menubar=no,scrollbars=yes,status=yes,resizable=yes')
    picwinID.document.write('<img src="' + filename + '" border="0">');
    //picwinID.document.write('width= ' + screen_width  + ' height= ' + screen_height)
    picwinID.document.close();
}
function downloadPicture(filename)
{
    window.open('FileDownload.aspx?downpicture=yes&picfilename=' + filename ,'downwindow','width=0,height=0,left=-50,top=-50');      
}
/*
function Trim(s) 
{
    // Remove leading spaces and carriage returns
    while ((s.substring(0,1) == ' ') || (s.substring(0,1) == '\n') || (s.substring(0,1) == '\r'))
    {
    s = s.substring(1,s.length);
    }
    // Remove trailing spaces and carriage returns
    while ((s.substring(s.length-1,s.length) == ' ') || (s.substring(s.length-1,s.length) == '\n') || (s.substring(s.length-1,s.length) == '\r'))
    {
    s = s.substring(0,s.length-1);
    }
    return s;
} 

function IsValidEmail(str)
{
    var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
	if (filter.test(str))
        return true;
    return  false;
}

*/