// Version 1.0.0.1 
// Viewpoint tracking scripts
// Set up parameter for referrer
var r = "Here_Is_New_York"
// This urls determine if the plugin is installed or not
 
RetVmp			= "http://www.viewpoint.com/images/tracking/rvmp.gif?" + r;
RetNoVmp		= "http://www.viewpoint.com/images/tracking/rnvmp.gif?" + r;
UniqVmp			= "http://www.viewpoint.com/images/tracking/uvmp.gif?" + r;
UniqNoVmp		= "http://www.viewpoint.com/images/tracking/unvmp.gif?" + r;

// These variable determines if we are counting unique visitors
// and how long between visits we will check again for the visitor
VwptUsingCookies	=true;
VwptDaysToExpiry	=31;

// -----------------------------------------------------------------------------------------------------------
// you don't need to modify this
// -----------------------------------------------------------------------------------------------------------

VwptVETInstalled	=false;
VwptAp=(navigator.appName);
VwptBv=(parseInt(parseInt(navigator.appVersion.substring(0,1))));
VwptIsIE=((VwptAp=="Microsoft Internet Explorer")&&(VwptBv>=4));
VwptIsNN=((VwptAp.indexOf("Netscape")!=-1)&&(VwptBv==4));
VwptAgt=(navigator.userAgent.toLowerCase());
VwptIsMac=(VwptAgt.indexOf("mac")!=-1);

if((VwptIsIE)&&(!VwptIsMac))document.write(unescape("%3cSCRIPT LANGUAGE=%22VBScript%22%3e Dim VwptP_o:Function VwptAXchk(n):VwptAXchk=1:On Error Resume Next:Set VwptP_o=CreateObject(n):if IsObject(VwptP_o) then:VwptAXchk=0:end if:End Function:%3c%2fSCRIPT%3e"));

function VwptNPChk(nam){
	for(var i=0;i<navigator.plugins.length;i++){
		if(navigator.plugins[i].name.toLowerCase()==nam.toLowerCase()){
			for(var j=0;j<navigator.plugins[i].length;j++){
				var m=navigator.plugins[i][j]
				if(m.enabledPlugin&&(m.type=="application/x-mtx")){
					return true
				}
			}
			return false
		}
	}
	return false
}

function VwptIEChk(){var x="AxMetaStream.MetaStreamCtl"
	if(VwptAXChk(x+"Secondary")==0){return true}
	if(VwptAXChk(x)==0) return true
	return false
}

function VwptVETInst(){var i=true,m="MetaStream"+(VwptIsMac?"3":" 3 Plugin")
	if(VwptIsIE&&(!(VwptIsMac)))i=VwptIEChk()
	else i=VwptNPChk(m)
	return i
}

function VwptGetCookie(a){var e,m=" "+document.cookie+";",N=" "+a+"=",s=m.indexOf(N);if(s!=1){s+=N.length;e=m.indexOf(";",s);return (unescape(m.substring(s,e)))}}
function VwptSetCookie(name,value,exp){document.cookie=name+"="+escape(value)+((exp==null)?"":"; expires="+exp.toGMTString())}

function VwptPreload(imj)
{
	var e=new Date();
	e.setTime(e.getTime()+(VwptDaysToExpiry*24*60*60*1000));
	if(VwptUsingCookies)
		VwptSetCookie("VwptTrack","RepeatVisitor",e);
	VwptTrack=new Image();
	VwptTrack.src=imj;
}

VwptVETInstalled=VwptVETInst();
if((VwptUsingCookies) && (VwptGetCookie("VwptTrack")=="RepeatVisitor")) { 
	if(VwptVETInstalled)
		VwptPreload(RetVmp);
	else
		VwptPreload(RetNoVmp);
}
else
	if(VwptVETInstalled)
		VwptPreload(UniqVmp);
	else
		VwptPreload(UniqNoVmp);

