var popupWindow=null;
function popup(mypage,myname,w,h,pos,infocus){

if (pos == 'random')
{LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
else
{LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,addressbar=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';popupWindow=window.open('',myname,settings);
if(infocus=='front'){popupWindow.focus();popupWindow.location=mypage;}
if(infocus=='back'){popupWindow.blur();popupWindow.location=mypage;popupWindow.blur();}

}

function chkrev()
{
if(document.frm1.txtname.value=='')
{
alert('Name is required');
document.frm1.txtname.focus();
return false;
}
if(document.frm1.txtrev.value=='')
{
alert('Review is required');
document.frm1.txtrev.focus();
return false;
}	
}
function showrew()
{
document.getElementById('review').style.display='block';
document.getElementById('linkreview').innerHTML="<a href='javascript:hiderew();'>Close Review</a>";
window.review.focus()
}
function hiderew()
{
document.getElementById('review').style.display='none';
document.getElementById('linkreview').innerHTML="<a href='javascript:showrew();'>Add Review</a>";
}