
primarywindow="";
function launchtalkpoint(presnumber,exit,csat,csid,template,cstt,configcheck,firstname,lastname,companyname,emailaddress)
	{
	var exitstr,csatstr,csidstr,templatestr,csttstr,configcheckstr,fnstr,lnstr,costr,eastr,resizeval;
	var browser = navigator.appName;
	var version = parseInt(navigator.appVersion);
	if (version < 4)
		{
		alert("You are not using a supported Browser. Please upgrade to version 4 or greater and try again. Sorry for any inconvenience.");
		}
	else
		{
		if (browser=="Netscape")
			{
			resizeval="no";
			}
		else
			{
			resizeval="yes";
			}
		if (exit!=""){exitstr="&exit="+exit}else{exitstr=""};
		if (csat!=""){csatstr="&csat="+csat}else{csatstr=""};
		if (csid!=""){csidstr="&csid="+csid}else{csidstr=""};
		if (template!=""){templatestr="&template="+template}else{templatestr=""};
		if (cstt!=""){csttstr="&cstt="+cstt}else{csttstr=""};
		if (firstname!=""){fnstr="&fn="+firstname}else{fnstr=""};
		if (lastname!=""){lnstr="&ln="+lastname}else{lnstr=""};
		if (companyname!=""){costr="&co="+companyname}else{costr=""};
		if (emailaddress!=""){eastr="&ea="+emailaddress}else{eastr=""};
		if (configcheck!="")
			{
			if (configcheck=="false"||configcheck=="FALSE"||configcheck=="False"||configcheck=="Skip"||configcheck=="skip")
				{configcheckstr="&tpcfgcheck=skip"}
			else
				{configcheckstr="&tpcfgcheck=skip"};
			}
		else
			{configcheckstr="&tpcfgcheck=skip"};
				
			
		x=screen.availWidth;
		y=screen.availHeight;
		if (x==""||y==""||x=="undefined"||y=="undefined")
			{
			x=770;
			y=530;
			}
		else
			{
			x=x-30;
			y=y-70;
			if (x>960){x=960};
			if (y>620){y=620};
			}
		if(primarywindow && !primarywindow.closed)
			{
			primarywindow.focus();return false;
			}
		else
			{
			primarywindow=window.open('http://theater.talkpoint.com/starthere.asp?launch=no&pres='+presnumber+csidstr+templatestr+csttstr+configcheckstr+fnstr+lnstr+costr+eastr+exitstr+csatstr,'primary',config='resizable='+resizeval+',status=no,menubars=no,directories=no,toolbar=no,scrollbars=no,width='+x+',height='+y+',left=1,top=1') ;
  			window.blur();
  			}  	
		}
  	}
  	
