//********************************************************************
//
//              Copyright (c) 2008 MindLab GmbH
//                     All rights reserved.
//
//====================================================================
//
// Project    : MyCare
// Filename   : nm_tr_config.js
//
//====================================================================
//
/**
 * @file
 * This script can be used to integrate Microsites, which are not on
 * on a tracked website, in a tracking environment. 
 *
 * @author   $Alexander Schreiber$
 * @version  $0.0.1$
 * @date     $31.08.2006$
 * 
 * @todo     further testing:   long parameters 
 *                              interaction with other cookies 
 * @listofchanges asc outsourcing of all config-parameters into seperate file 2007/12/13
 */
//
//********************************************************************

//********************************************************************
//config Object
//********************************************************************
function cConfigPixel()
{
	//-----------------------------------------------------
	// members
	//-----------------------------------------------------
	//true = Tracker uses Cookies
	//false= tracker uses Session IDs in Urls
	this.m_bCookieTracking = false;

	//set to true, if you want to get the params automatically
	this.m_bAutoparams = true;
	//set to true, if you want to send the pixel automatically
	this.m_bAutosend = true;
	//The protocol to use for getting the pixel, could be either http
	//or https
	this.m_strPixelProtocol         = location.href.substr(0, location.href.indexOf(":"));
	//the servername to get the pixel from (no protocol here, and
	//no path here), you can append a port or prepend an authendication
	//like: user:passwort@myserver.mydomain.com:12345
	//where "user:password@" is the authentication
	//      "myserver.mydomain.com" is the fully qualified servername
	//      ":12345" is a port-Number
	this.m_strPixelServer           = "www.mycare.de/tracker";
	//the path to request from the given server, this path could of
	//course include CGI-Parameters
	//example: "/mywebbug?thisismyparameter=value"
	this.m_strPixelJSPath           = "/tracking/nm_track.js";
	
	//Send Url by default
	this.m_bSendUrl              = true;
	//Send Referrer by default
	this.m_bSendReferrer         = true;
	//Send MetaTags by default
	this.m_bSendMetaTags         = true;
	//Send Browser Setting, Screen Infos etc.
	this.m_bSendTech             = true;
	//Send Permanentcookie
	this.m_bSendPERMSID             = true;
	//Send URL-Hash.
	this.m_bSendUrlHash              = true;
	//--------------------------------------------------------
	// metatags to be parsed
	//--------------------------------------------------------
	this.m_aMetatag = new Array(
		"nm.*",
		""
	);
	//--------------------------------------------------------
	// Hasht parameter  to be parsed
	//--------------------------------------------------------
	this.m_aHashParameter = new Array(
		"test",
		"key"
	);
	
  // Crosselling Parameters
	this.m_recommendationPath       = "nm_recommendation_js.php";
	this.m_recommendation_request   = "nm.recom.crosselling.show";
	this.m_recommendation_prodid   = "nm.productid.view";
	this.m_recommendation_target   = "nm.recom.crosselling.target";
	this.m_recommendation_targetname   = "nm.recom.crosselling.target.name";
	
	
	
} // end class cConfigPixel

//==========================================================
// getAutoParams
//==========================================================
function config_getSendUrlHash () {
	return this.m_bSendUrlHash;
}
//==========================================================
// getAutoParams
//==========================================================
function config_getAutoParams () {
	return this.m_bAutoparams;
}
//==========================================================
// getAutoSend
//==========================================================
function config_getAutoSend () {
	return this.m_bAutosend;
}
//==========================================================
// getSendUrl
//==========================================================
function config_getSendUrl () {
	return this.m_bSendUrl;
}
//==========================================================
// getSendReferrer
//==========================================================
function config_getSendReferrer () {
	return this.m_bSendReferrer;
}
//==========================================================
// getSendMetatags
//==========================================================
function config_getSendMetatags () {
	return this.m_bSendMetaTags;
}
//==========================================================
// getSendTech
//==========================================================
function config_getSendTech () {
	return this.m_bSendTech;
}
//==========================================================
// getSendPERMSID
//==========================================================
function config_getSendPERMSID () {
	return this.m_bSendPERMSID;
}
//==========================================================
// getPixelUrl
//==========================================================
function config_getPixelUrl () {
  //alert(this.m_strPixelProtocol+"://"+this.m_strPixelServer + this.m_strPixelJSPath);
	return this.m_strPixelProtocol+"://"+this.m_strPixelServer + this.m_strPixelJSPath;
}
//==========================================================
// getProtocol
//==========================================================
function config_getProtocol () {
	return this.m_strPixelProtocol;
}
//==========================================================
// getPixelServer
//==========================================================
function config_getPixelServer () {
	return this.m_strPixelServer;
}
//==========================================================
// getTrackingJS
//==========================================================
function config_getTrackingJS () {
	return this.m_strPixelJSPath;
}
//==========================================================
// isCookieTracking
//==========================================================
function config_isCookieTracking () {
	return this.m_bCookieTracking;
}

//==========================================================
//Definition of Prototypes
//==========================================================
//methoden zur Klasse hinzufuegen
cConfigPixel.prototype.isCookieTracking = config_isCookieTracking;
cConfigPixel.prototype.getPixelUrl 		= config_getPixelUrl;
cConfigPixel.prototype.getProtocol 		= config_getProtocol;
cConfigPixel.prototype.getPixelServer 	= config_getPixelServer;
cConfigPixel.prototype.getTrackingJS 	= config_getTrackingJS;
cConfigPixel.prototype.getAutoParams 	= config_getAutoParams;
cConfigPixel.prototype.getAutoSend 		= config_getAutoSend;
cConfigPixel.prototype.getSendUrl 		= config_getSendUrl;
cConfigPixel.prototype.getSendUrlHash 	= config_getSendUrlHash;
cConfigPixel.prototype.getSendReferrer 	= config_getSendReferrer;
cConfigPixel.prototype.getSendMetatags 	= config_getSendMetatags;
cConfigPixel.prototype.getSendTech 		= config_getSendTech;
cConfigPixel.prototype.getSendPERMSID 		= config_getSendPERMSID;
