var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
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;
}
if(pos=="center")
{
	LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;
}
else if((pos!="center" && pos!="random") || pos==null)
{
	LeftPosition=0;TopPosition=0
}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);
if(win.focus){win.focus();}}

function ReportWin(path)
{
	NewWindow('reports.php?report='+path,'ezm_report','804','600','yes','center')
}
function WatchTheVideo(id)
{
	NewWindow('http://www.linkitsoftware.com/watch_video.php?prod=JM&sec='+id,'watch_video','800','600','yes','center')
}
function OnlineDemo(file)
{
	NewWindow('http://www.linkitsoftware.com/'+file,'online_demo','800','600','yes','center')
}
function LatestUpdates()
{
	NewWindow('latest_updates.htm','latest_updates','300','200','yes','center')
}
function PrinterFriendly()
{

	frm=document.order_frm;
	popUrl='ordermail_print.php?';
	popUrl+='comp_fld='+frm.comp_fld.value;
	popUrl+='&name_fld='+frm.name_fld.value;
	if(frm.payment_mode.value=='C')
	{
		popUrl+='&phone_fld='+frm.phone_fld.value;
		popUrl+='&fax_fld='+frm.fax_fld.value;
		popUrl+='&email_fld='+frm.email_fld.value;
	}
	else
	{
		popUrl+='&cnb_acc_no='+frm.cnb_acc_no.value;
	}
	popUrl+='&add_fld='+frm.add_fld.value;
	popUrl+='&city_fld='+frm.city_fld.value;
	popUrl+='&state_fld='+frm.state_fld.value;
	popUrl+='&zip_fld='+frm.zip_fld.value;
	popUrl+='&country_fld='+frm.country_fld.value;
	popUrl+='&noc_fld='+frm.noc_fld.value;
	popUrl+='&nol_fld='+frm.nol_fld.value;
	popUrl+='&tsp_fld='+frm.tsp_fld.value;
	popUrl+='&email_tsp_fld='+frm.email_tsp_fld.value;
	popUrl+='&payment_mode='+frm.payment_mode.value;
	NewWindow(popUrl,'ordermail_print','750','550','yes','center')
}
function OnlineAudioVideo(file,w,h,scrollbar)
{
	NewWindow(file,'online_demo',w,h,scrollbar,'center')
}