﻿	//Custom survey launch for T-Mobile
	var survey = new VoviciWebInterceptSurvey();

	// This is the Nth visitor to invite. set to 1 if  you want every visitor invited
	survey.NthVisitorToInvite = 10;

	// An exit survey watcher can be launched instead of a survey itself
	survey.SurveyUrl = "http://www.spasurveys.com/se.ashx?s=251137457AA92E84";
		
	// Set as a web intercept
	survey.SurveyInNewWindow = true;

	// Take the survey immediately if popups are blocked
	survey.FailoverToLayerWhenPopupsBlocked = false;

	// This must match the name/path to the SurveyInvite.js on your
	survey.WatcherJavascriptUrl = 'http://websurvey.spa-mr.com/MK/VoviciSurveyInvite.js';

	// Examples: www.example.com
	// empty means the current domain
	survey.CookieDomain = '';

	// How long should the cookie last?
	// 0 or '' - Default is a session cookie and expires when you close the browser.
	// number - Otherwise specify the number of minutes (1440 in a day)
	survey.CookieDuration = '43200';

	// Cookie Value.
	survey.CookieValue = "1";

	// The survey invite can be displayes as a 'popup' or a 'layer'
	survey.InviteStyle = 'layer';

	// if using a layer, the layer html, ids for the yes and no buttons, and size/position can be tuned
	survey.SurveyPromptDivInnerHtml = ''
		+ '<div id="VoviciSurveyPrompt" style="color:#5f5f5f;position:absolute;top:170px;left:40%;width:320px;height:228px;font-family:Arial, Helvetica, sans-serif;font-size:11px;padding:0;margin:0;z-index:8000;">'
		+ '<div style="background-image:url(http://www.spa-mr2.com/websurvey/images/bg-image-top.gif);background-repeat:no-repeat;height:18px;"></div>'
		+ '<div style="background-image:url(http://www.spa-mr2.com/websurvey/images/bg-image-mid.gif);background-repeat:no-repeat;background-color:#e4e4e4;border-left:#bfbfbf 1px solid;border-right:#686868 3px solid;min-height:150px;padding:0 10px 0 20px;">'
		+ '<div style="position:relative;color:#e20074;font-size:16px;font-weight:bold;margin:0;padding:0;line-height:normal;top:-6px;">Анкета за посетителите на T-Mobile</div>'
		+ '<p style="margin:0;padding:6px 0 10px 0;">Кажете ни што мислите за нашата веб страница</p>'
		+ '<ul style="list-style:none;list-style-type:none;list-style-image:none;margin:0;padding:0;">'
		+ '<li style="list-style:none;list-style-type:none;list-style-image:none;background-image:url(http://www.spa-mr2.com/websurvey/images/bullet_pink.gif);background-repeat:no-repeat;background-position:0px 5px;padding:0 0 0 10px;margin:0;">Прашалникот треба да го пополните по вашата посета на страницата</li>'
		+ '<li style="list-style:none;list-style-type:none;list-style-image:none;background-image:url(http://www.spa-mr2.com/websurvey/images/bullet_pink.gif);background-repeat:no-repeat;background-position:0px 5px;padding:0 0 0 10px;margin:0;">Одговарањето на прашањата нема да ви одземе повеќе од 5 минути </li>'
		+ '<li style="list-style:none;list-style-type:none;list-style-image:none;background-image:url(http://www.spa-mr2.com/websurvey/images/bullet_pink.gif);background-repeat:no-repeat;background-position:0px 5px;padding:0 0 0 10px;margin:0;">Вашите одговори придонесуваат кон подобрувањето на страницата</li>'
		+ '<li style="list-style:none;list-style-type:none;list-style-image:none;background-image:url(http://www.spa-mr2.com/websurvey/images/bullet_pink.gif);background-repeat:no-repeat;background-position:0px 5px;padding:0 0 0 10px;margin:0;">Вашите одговори се анонимни</li>'
		+ '</ul>'
		+ '<p style="margin:0;padding:10px 0 10px 0;">Ви благодариме!</p>'
		+ '<p style="margin:0;padding:10px 0 0 0;">'
		+ '<button id="VoviciSurveyPromptYesButton" onclick="survey.CheckForInvite();" style="background-image:url(http://www.spa-mr2.com/websurvey/images/btn_survey.gif);background-repeat:no-repeat;height:23px;width:100px;color:#ffffff;font-size:10px;font-weight:bold;border:none;margin-right:10px;">Да</button>'
		+ '<button id="VoviciSurveyPromptNoButton" style="background-image:url(http://www.spa-mr2.com/websurvey/images/btn_survey.gif);background-repeat:no-repeat;height:23px;width:100px;color:#ffffff;font-size:10px;font-weight:bold;border:none;">Не, благодарам</button>'
		+ '</p>'
		+ '</div>'
		+ '<div style="background-image:url(http://www.spa-mr2.com/websurvey/images/bg-image-bot.gif);background-repeat:no-repeat;height:17px;"></div>'
		+ '</div>';   
	
	// This needs to match the ids used in the SurveyPromptDivInnerHtml
	survey.SurveyPromptDivName = "VoviciSurveyPrompt";
	survey.SurveyPromptDivYesButtonId = "VoviciSurveyPromptYesButton";
	survey.SurveyPromptDivNoButtonId = "VoviciSurveyPromptNoButton";

	// Size the SurveyPromptDiv
	survey.SurveyPromptDivWidth = 320;
	survey.SurveyPromptDivHeight = 228;

	//Position the SurveyPromptDiv
	survey.SurveyPromptDivLeftOffset = 300;
	survey.SurveyPromptDivTopOffset = 150;

	// If SurveyInNewWindow is true, or launching an exit survey
	survey.SurveyWindowWidth = 785;
	survey.SurveyWindowHeight = 700;

	//Position the survey window
	survey.SurveyWindowLeftOffset = 100;
	survey.SurveyWindowTopOffset = 100;
	survey.SurveyWindowDecorationOptions = "scrollbars=yes, resizable=true, location=no, toolbar=no, menubar=no";

	// If we display the survey on a layer (when popups blocked)
	survey.SurveyFrameName = "VoviciSurveyFrameOuterDiv";
    	survey.SurveyInnerFrameName = "VoviciSurveyFrameInnerDiv";
    	survey.SurveyDisplayFrameInnerHtml = '<div id="' + survey.SurveyFrameName + '" style="background-color:#FFFFFF;border: 1px solid #000000;width:785px; height:700px">'
                + '<div id="' + survey.SurveyPromptDivNoButtonId + '" style="text-align:right; color: black; font: normal 10px arial, helvetica, sans-serif;"><div style="text-align:left;"> Your browser is set to block the exit survey.  Please complete the survey now </div>[Close]</div>'
                + '<div id="' + survey.SurveyInnerFrameName + '" ></div>'
                + '</div>';

	// This kicks off the survey. It will load itself on window.onload
	//survey.DebuggingEnabled(true);
	
	survey.Load();
	//survey.TestLoad();
