﻿// Below enter the url where the swf file is located// Example: var webpeople_URL = 'http://www.sitename.com/';var webpeople_URL = 'http://www.shamrockcommunications.com/webpeople/';// Below select the preset position of the presentation// 1 = Top left of the browser screen// 2 = Top right of the browser screen// 3 = Bottom left of the browser screen// 4 = Bottom right of the browser screen// Example: var webpeople_Position = 4; would be positioned on the bottom rightvar webpeople_Position = 4;// Do not change the parameters belowvar staticPosition = 'no';// swf file sizevar webpeople_SWF_File_Width = 300;var webpeople_SWF_File_Height = 400;// swf file name below // NOTE: Do not add .swf extensionvar webpeople_ID = 'webpeople1';var webpeople_divHorPos = 0;var webpeople_divVerPos = 0;var webpeopleVersion = -1; var arrNavInfo = []; var webpeopleString;var webpeopleParamString;var divID = 'div' + webpeople_ID;arrNavInfo.navprop = navigator.userAgent.toLowerCase();if (document.getElementById ) { arrNavInfo[0] = 'ie5'; arrNavInfo[1] = 'Internet Explorer 5+'; }else if ( document.layers ) { arrNavInfo[0] = 'ns4'; arrNavInfo[1] = 'Netscape 4'; }else if ( window.opera && document.childNodes ) { arrNavInfo[0] = 'op7'; arrNavInfo[1] = 'Opera 7+'; }else if ( arrNavInfo.navprop.indexOf( 'opera' ) + 1 ) { arrNavInfo[0] = 'opr'; arrNavInfo[1] = 'Opera 6-'; }else if ( navigator.appName.indexOf( 'WebTV' ) + 1 ) { arrNavInfo[0] = 'wtv'; arrNavInfo[1] = 'WebTV'; }else if ( navigator.product == 'Gecko' ) { arrNavInfo[0] = 'gek'; arrNavInfo[1] = 'Gecko engine (Mozilla, Netscape 6+ etc.)'; }else if ( navigator.vendor == 'KDE' || ( document.childNodes && ( !document.all || navigator.accentColorName ) && !navigator.taintEnabled ) ) { arrNavInfo[0] = 'kde'; arrNavInfo[1] = 'Safari'; } else if ( document.all && navigator.appName != 'Microsoft Pocket Internet Explorer' ) { arrNavInfo[0] = 'ie4'; arrNavInfo[1] = 'Internet Explorer 4'; }else if ( (arrNavInfo.navprop.indexOf( 'msie' ) + 1 ) && window.ActiveXObject ) { arrNavInfo[0] = 'pie'; arrNavInfo[1] = 'Pocket Internet Explorer'; }else { arrNavInfo[0] = 'na'; arrNavInfo[1] = 'an unknown browser'; }if( arrNavInfo.navprop.indexOf( 'linux' ) + 1 ) { arrNavInfo[2] = 'lin'; arrNavInfo[3] = 'Linux'; }else if( arrNavInfo.navprop.indexOf( 'x11' ) + 1 ) { arrNavInfo[2] = 'unx'; arrNavInfo[3] = 'Unix'; }else if( arrNavInfo.navprop.indexOf( 'mac' ) + 1 ) { arrNavInfo[2] = 'mac'; arrNavInfo[3] = 'MacOS'; }else if( navigator.platform == 'PalmOS' ) { arrNavInfo[2] = 'plm'; arrNavInfo[3] = 'Palm OS'; }else if( ( navigator.platform == 'WinCE' ) || ( navigator.platform == 'Windows CE' ) || ( navigator.platform == 'Pocket PC' ) ) { arrNavInfo[2] = 'wce'; arrNavInfo[3] = 'Windows CE'; }else if( arrNavInfo.navprop.indexOf( 'win' ) + 1 ) { arrNavInfo[2] = 'win'; arrNavInfo[3] = 'Windows'; }else if( arrNavInfo.navprop.indexOf( 'webtv' ) + 1 ) { arrNavInfo[2] = 'wtv'; arrNavInfo[3] = 'WebTV Platform'; }else { arrNavInfo[2] = 'na'; arrNavInfo[3] = 'an unknown operating system'; }        if (navigator.plugins != null && navigator.plugins.length > 0)     {        if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"])         {            var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";            var webpeopleDescription = navigator.plugins["Shockwave Flash" + swVer2].description;            descArray = webpeopleDescription.split(" ");            tempArrayMajor = descArray[2].split(".");            versionMajor = tempArrayMajor[0];            if ( descArray[3] != "" )                { tempArrayMinor = descArray[3].split("r"); }             else                { tempArrayMinor = descArray[4].split("r"); }                versionMinor = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;                webpeopleVersion = parseFloat(versionMajor + "." + versionMinor);        }    }    else    {                  for (var i = 8; i<10; i++)                {                try                {                        var objFlash = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + i);                        if(objFlash){webpeopleVersion = i;}                                }        catch(e)        {}        }    }if (window.addEventListener) window.addEventListener("load",dowebpeopleOW,false); else if (window.attachEvent) window.attachEvent("onload",dowebpeopleOW);function dowebpeopleOW() {    if ( staticPosition == 'no')        { StartVideo();}    else    {StartVideoStatic();}}function StartVideo() {var elDiv = document.createElement("div");elDiv.id = divID;elDiv.style.position = "absolute";elDiv.style.zIndex = 9999;elDiv.style.left = 0;elDiv.style.top = 0;elDiv.style.height = webpeople_SWF_File_Height;elDiv.style.width = webpeople_SWF_File_Width;elDiv.style.visibility  = "visible";    switch (arrNavInfo[0])    {    case 'ie5':                   if (webpeopleVersion > 7)            {showFlash();}        else            {noFlash();}                                 elDiv.innerHTML = webpeopleString;     		            document.body.appendChild(elDiv);                    window.onscroll = ScrollHnd;                    window.onresize = ScrollHnd;                    window.setInterval('ScrollHnd()',30);                     ScrollHnd();     break;     case 'gek':         if (webpeopleVersion > 7)           {showFlash();}        else           {noFlash();}        if(window.onscroll === undefined)            {            elDiv.innerHTML = webpeopleString;     		    document.body.appendChild(elDiv);		    window.setInterval('ScrollHnd()',30);            ScrollHnd();            }           else            {            elDiv.innerHTML = webpeopleString;     		    document.body.appendChild(elDiv);		    window.onscroll = ScrollHnd;            window.onresize = ScrollHnd;            ScrollHnd();            }    break;      case  'op7':       if (webpeopleVersion > 7)          {showFlash();}        else          {noFlash();}            elDiv.innerHTML = webpeopleString;     		document.body.appendChild(elDiv);		window.onscroll = ScrollHnd;        window.onresize = ScrollHnd;        ScrollHnd();     break;          case  'kde':       if (webpeopleVersion > 7)          {showFlash();}        else          {noFlash();}            elDiv.innerHTML = webpeopleString;     		document.body.appendChild(elDiv);		window.onscroll = ScrollHnd;        window.onresize = ScrollHnd;        ScrollHnd();     break;         default:        notSupported();        elDiv.innerHTML = webpeopleString;     		document.body.appendChild(elDiv);    }           }function StartVideoStatic() {var elDiv = document.createElement("div");elDiv.id = divID;elDiv.style.position = "absolute";elDiv.style.zIndex = 9999;elDiv.style.height = webpeople_SWF_File_Height;elDiv.style.width = webpeople_SWF_File_Width;elDiv.style.visibility  = "visible";    switch (arrNavInfo[0])    {    case 'ie5':                   if (webpeopleVersion > 7)            {             showFlash();            elDiv.innerHTML = webpeopleString;     		    document.body.appendChild(elDiv);		    }        else            {noFlash();            elDiv.innerHTML = webpeopleString;     		    document.body.appendChild(elDiv);		    }       break;     case 'gek':         if (webpeopleVersion > 7)           {showFlash();           elDiv.innerHTML = webpeopleString;     		    document.body.appendChild(elDiv);		    }        else           {noFlash();           elDiv.innerHTML = webpeopleString;     		    document.body.appendChild(elDiv);		    }        break;         case  'op7':       if (webpeopleVersion > 7)          { showFlash();         elDiv.innerHTML = webpeopleString;     		    document.body.appendChild(elDiv);		    }        else          {noFlash();           elDiv.innerHTML = webpeopleString;     		    document.body.appendChild(elDiv);		    }      break;          case  'kde':       if (webpeopleVersion > 7)          {showFlash();         elDiv.innerHTML = webpeopleString;     		    document.body.appendChild(elDiv);		    }        else          {noFlash();            elDiv.innerHTML = webpeopleString;     		    document.body.appendChild(elDiv);		    }             break;          default:        notSupported();        elDiv.innerHTML = webpeopleString;     		document.body.appendChild(elDiv);		}           }function ScrollHnd() {    var divScroll;    var wnd;    var screenWd = 0;    var screenHt = 0;    var screenX = 0;    var screenY = 0;       var objDoc;     var divLeft = 0;    var divTop = 0;            objDoc = document;     wnd = window;    if( objDoc.getElementById ) {  divScroll = objDoc.getElementById(divID); if( divScroll.style ) { divScroll = divScroll.style; }  }     if (window.innerHeight)      {              screenHt = wnd.innerHeight;            screenWd = wnd.innerWidth;       }       else if ( objDoc.documentElement && ( objDoc.documentElement.clientWidth || objDoc.documentElement.clientHeight ) ) 	  {			screenWd = objDoc.documentElement.clientWidth; 			screenHt = objDoc.documentElement.clientHeight;	  } 	 else if ( objDoc.body && ( objDoc.body.clientWidth || objDoc.body.clientHeight ) ) 	 {				screenWd = objDoc.body.clientWidth; 				screenHt = objDoc.body.clientHeight;	 } 		if (window.innerHeight)	{ 	                    screenY = wnd.pageYOffset; 	                    screenX = wnd.pageXOffset; 	 }	 else if (objDoc.body && ( objDoc.body.scrollLeft || objDoc.body.scrollTop ) ) 		{ 	                	screenY = objDoc.body.scrollTop; 		                screenX = objDoc.body.scrollLeft; 		} 	else 	if ( objDoc.documentElement && ( objDoc.documentElement.scrollLeft || objDoc.documentElement.scrollTop ) ) 		{ 			        screenY = objDoc.documentElement.scrollTop; 			        screenX = objDoc.documentElement.scrollLeft; 		} 			 		     divLeft = divLeft + webpeople_divHorPos;    divTop = divTop + webpeople_divVerPos;       divLeft =  divLeft + screenX;   divTop = divTop +  screenY;     if (( webpeople_Position % 2 ) == 0)  {          divLeft =  divLeft + (screenWd - webpeople_SWF_File_Width);   }    if (( webpeople_Position < 3 ) == false)    {            divTop = divTop + (screenHt - webpeople_SWF_File_Height);   }	divScroll.left = divLeft +  'px';    divScroll.top = divTop +  'px';}function hideNoFlash(){	if( document.layers ) 	{		if( document.layers[divID] ) 		{ 			 document.layers[divID].visibility = 'hidden'; 		} 	}	if( document.getElementById ) 	{ 		 document.getElementById(divID).style.visibility = 'hidden'; 	}	if( document.all ) 	{ 		return document.all[divID].visibility = 'hidden'; 	}}function showFlash(){      webpeopleParamString = '?webpeopleTimeVariable='  + '&webpeopleID=' + webpeople_ID + '&webpeopleTimeDelayAfter='  + '&webpeopleCookieOption='  + '&webpeopleCookieDays='  + '&webpeopleParam' ;      webpeopleString = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' width='" + webpeople_SWF_File_Width + "' height='" + webpeople_SWF_File_Height + "' id='obj" + webpeople_ID + "' align='middle' codebase='https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0' >";      webpeopleString += "<param name='movie' value='" + webpeople_URL + webpeople_ID + '.swf' + webpeopleParamString + "' />";      webpeopleString += "<param name='quality' value='high' />";      webpeopleString += "<param name='wmode' value='transparent' />";      webpeopleString += "<param name='allowScriptAccess' value='always' />";      webpeopleString += "<param name='loop' value='false' />";      webpeopleString += "<embed src='" + webpeople_URL + webpeople_ID + '.swf' + webpeopleParamString + "' allowScriptAccess='always' quality='high' wmode='transparent' loop='false' width='" + webpeople_SWF_File_Width + "' height='" + webpeople_SWF_File_Height + "' name='obj" + webpeople_ID + "' align='middle' type='application/x-shockwave-flash' pluginspage='https://www.macromedia.com/go/getflashplayer' />";      webpeopleString += "</object>";}function noFlash(){  	 webpeopleString = '<style type="text/css">';	 webpeopleString += '<!-- .aH:link{ text-decoration:none;font-size: 12px; font-family: Verdana;font-weight: bold;color: #990000;} .aH:visited{ text-decoration:none;font-size: 12px; font-family: Verdana;font-weight: bold;color: #CCCCCC;} .aH:hover{ text-decoration:none;font-size: 12px; font-family: Verdana;font-weight: bold;color: #0033FF;} --></style>';   	 webpeopleString += '<table width="157" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#333333"><tr>';   	 webpeopleString += '<td width="113" align="center" bgcolor="#CCCCCC"><span style="color: #666666;font-size: 18px;font-weight: bold;font-family: Tahoma, Verdana;">Dear User</span></td>';   	 webpeopleString += '<td width="38" align="center" bgcolor="#CCCCCC" ><a href="#" class="aH" onclick="javascript:hideNoFlash()"><span style="font-size: 18px; font-weight: bold; color: #990000;">×</span> </a></td></tr><tr>';   	 webpeopleString += '<td height="80" colspan="2"><div align="center" style="color: #CCCCCC;font-family: Tahoma, Verdana;font-size: 12px;">This page requires <br/>Flash Player  <br/>to enable you to see the video module.<br/>Click below to install. </div></td></tr><tr>';   	 webpeopleString += '<td height="45" colspan="2" align="center"><a href="http://www.macromedia.com/go/getflashplayer" class="aH" target="_blank">::INSTALL FLASH::</a> </td></tr></table>';     webpeopleString += '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" WIDTH="1" HEIGHT="1" id="MN">';     webpeopleString += '<EMBED src="" quality=high bgcolor=#FFFFFF WIDTH="0" HEIGHT="0" NAME="MN" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"/>';   	 webpeopleString += '</OBJECT>';}function notSupported(){	webpeopleString = '<style type="text/css">';    webpeopleString += '<!-- .aH:link{ text-decoration:none;font-size: 12px; font-family: Verdana;font-weight: bold;color: #990000;} .aH:visited{ text-decoration:none;font-size: 12px; font-family: Verdana;font-weight: bold;color: #CCCCCC;} .aH:hover{ text-decoration:none;font-size: 12px; font-family: Verdana;font-weight: bold;color: #0033FF;} --></style>';    webpeopleString += '<table width="157" border="1" cellpadding="0" cellspacing="0" bordercolor="#CCCCCC" bgcolor="#333333"><tr>';    webpeopleString += '<td width="113" align="center" bgcolor="#CCCCCC"><span style="color: #666666;font-size: 18px;font-weight: bold;font-family: Tahoma, Verdana;">Dear User</span></td>';    webpeopleString += '<td width="38" align="center" bgcolor="#CCCCCC" ><a class="aH" href="#" onclick="javascript:hideNoFlash()"><span style="font-size: 18px; font-weight: bold; color: #990000;">×</span> </a></td></tr><tr>';    webpeopleString += '<td height="80" colspan="2"><div align="center" style="color: #CCCCCC;font-family: Tahoma, Verdana;font-size: 12px;">This page requires <br/>new browser version <br/>or another browser<br/>to enable you to see the video module.</div></td></tr></tr></table>';}