// //Get search string from script tag var searchString_sw = "vOmniture=1&itype=1&hostName=surveywriter.net"; var OmnitureID = getCookie_sw('s_vi'); if (OmnitureID==null) {OmnitureID = "NA";} if (OmnitureID.length==0) {OmnitureID = "NA";} searchString_sw = searchString_sw + "&OmnitureID=" + OmnitureID; var MemberID = getCookie_sw('USERID'); if (MemberID==null) {MemberID = "NA";} if (MemberID.length==0) {MemberID = "NA";} searchString_sw = searchString_sw + "&MemberID=" + MemberID; var uri = location.href; if (uri==null) {uri = "NA";} if (uri.length==0) {uri = "NA";} searchString_sw = searchString_sw + "&uri=" + uri; var itype = query_sw('itype'); if (itype==null) {itype = "0";} if (itype.length==0) {itype = "0";} //searchString_sw = searchString_sw + "&itype=" + itype; var strReferrer=document.referrer; strReferrer=strReferrer.replace("http://",""); strReferrer=strReferrer.replace("https://",""); var arrayReferrer=strReferrer.split("/"); var varReferrer=arrayReferrer[0]; var isTest_sw = query_sw('test'); var isExit_sw = query_sw('exit'); var itype_sw = query_sw('itype'); var TriggerLogic_sw="1==1"; var popupDelay_sw="0"; var popUpOdds_sw=0; var testType_sw=0; //Control=0 ; Exposed=1 var popupDelayR_sw=0; var PIN=0; var tpix=''; var adViewsTotal_sw=0; var deviceType_sw=1; var pimMode=0; var isPIM_sw=1; //if (itype_sw=='1') {popUpOdds_sw = 20;TriggerLogic_sw="TrackingAdViews_sw < 1";popupDelay_sw=15;TriggerLogic_sw="adViews_sw > 1";isExit_sw=1;isExit_sw=2;popupDelayR_sw=10;pimMode=1;} //Modify popup odds. A 1 means 1% of the hits, 10=10%, etc... //Keep the 99 itype as is if (itype_sw=='99') {popUpOdds_sw=0;TriggerLogic_sw="adViews_sw>0";testType_sw=1;} var deviceType_sw=getDevice_sw(navigator.userAgent||navigator.vendor||window.opera); if (itype_sw=='1') {popUpOdds_sw=1;popupDelay_sw=600;testType_sw=1;TriggerLogic_sw="adViews_sw>999";pimMode=1;} if (isExit_sw > '0') { var winType=2; } else { var winType=1; } if (1!=1) { } else if ((popupDelay_sw==-99) && (window.self!=window.top) && (parent.document.getElementById('iDiv_sw')==null)){ //!!!***Writes out from same domain orgin iframe //!!!***_______________________________________ writeInterceptScriptParent(); } else { //Set intercept in motion //----------------------- if (isExit_sw > 0) {window.onunload=dounload_001_sw;} var noGo_sw=0; var expireDays_sw=180; expireDate_sw=getDate_sw(expireDays_sw); if (isTest_sw==1) {noGo_sw=0;} //Get JSON Cookie //Place cookie values into objJsonCookie_sw //setCookie_sw('jsonCookie_sw', JSON.stringify(objJsonCookie_sw), 180); var strJsonCookie_sw=getCookie_sw('jsonCookie_sw'); if (strJsonCookie_sw==null) {strJsonCookie_sw = ' ';} try { var objJsonCookie_sw = JSON.parse(strJsonCookie_sw); } catch (e) { var objJsonCookie_sw = {}; } var objJsonCookiePN_sw = {}; var objJsonCookiePNvars_sw = {}; //Cookie records Intercept Served for this project var cn="C8875"; var pn="001" if (objJsonCookie_sw[cn]==null) { objJsonCookiePNvars_sw.e=0; objJsonCookiePNvars_sw.p=0; objJsonCookiePNvars_sw.x=expireDate_sw; objJsonCookiePN_sw[pn]=objJsonCookiePNvars_sw; objJsonCookie_sw[cn]=objJsonCookiePN_sw; } else if (objJsonCookie_sw[cn][pn]==null) { objJsonCookiePNvars_sw.e=0; objJsonCookiePNvars_sw.p=0; objJsonCookiePNvars_sw.x=expireDate_sw; objJsonCookie_sw[cn][pn]=objJsonCookiePNvars_sw; } //Delete cookie if expire date has been reached destroyCookie(); //Write JSON Cookie back out immediately with testType_sw if (testType_sw==1) { objJsonCookie_sw[cn][pn].e = testType_sw; setCookie_sw('jsonCookie_sw', JSON.stringify(objJsonCookie_sw), 180); } //Cookie records Intercept Served for this project var surveyAsked_sw=objJsonCookie_sw[cn][pn].p; if (popUpOdds_sw.length==0) {popUpOdds_sw = 0;} //Set 5 second delay for control in case exposed is also on the page if ((testType_sw==0) && (popupDelay_sw == 0)) {popupDelay_sw=5;} //Cookie to read number of times page/ad viewed var isStrType_sw='t'; if (testType_sw==0) {isStrType_sw='c';} var adViewsCookieName_sw= "a" + isStrType_sw + itype_sw; var adViews_sw=objJsonCookie_sw[cn][pn][adViewsCookieName_sw]; if (adViews_sw==null) {adViews_sw=0;} adViews_sw=parseFloat(adViews_sw) + 1; objJsonCookie_sw[cn][pn][adViewsCookieName_sw] = adViews_sw; //Popup Trigger Logic based on page/ad views //var TriggerLogic_sw = query_sw('trLogic'); if (TriggerLogic_sw.length==0) {TriggerLogic_sw = "1==1";} var AdViewFlag_sw=0; if (eval(TriggerLogic_sw)) {AdViewFlag_sw=1;} //Check for Test Type Cookie var exposedCookieValue_sw=objJsonCookie_sw[cn][pn].e; if (exposedCookieValue_sw==null) {exposedCookieValue_sw=0;} if (testType_sw==1) {objJsonCookie_sw[cn][pn].e = testType_sw;} if ((exposedCookieValue_sw==1) && (testType_sw==0)) {noGo_sw=1;} //Set invite timer delay //var popupDelay_sw = query_sw('delayTime'); if (popupDelay_sw.length==0) {popupDelay_sw = 0;} //Sets the total percentage figure. Currently set to work on a 100 scale var popUpScale_sw = 100; //Set default for passSegFlag var passSegFlag_sw=0 var segValue_sw=""; var memID_sw=""; if (popupDelay_sw < 0) { popupDelay_sw = 0; passSegFlag_sw = 1; } //Popup Window Content var iContentM_sw='\
\
\
\ We want to learn more about you through a short survey.\
\
\ \ \
\
This survey is being conducted by the Sharecare Marketing Research department. All information will be used in a manner consistent with the Sharecare\ \ privacy policy.\
\ '; var iContentD_sw='\
\ \ \ \ \ \ \
\

\ Thank you for visiting Sharecare.\

\

\ We would like to learn about you through a short
survey that should take no more than a few minutes
of your time.\

\

\ Before proceeding, please review the Sharecare
Privacy Statement below.\

\

\ \ \

\

\ This survey is being conducted by the Sharecare marketing research department. All information will be used in a manner consistent with the Sharecare \ privacy policy.\ Your responses will not be disclosed with any information that can personally identify you (eg, email address, name, etc). You will not be re-contacted regarding your answers to this survey.\

\
\
 
'; if (deviceType_sw==2) { iContent_sw=iContentM_sw; } else { iContent_sw=iContentD_sw; } if ((isExit_sw != 1) && (noGo_sw==0)) { //Check to see if Popup Window should trigger checkTriggerPopup_001(AdViewFlag_sw,popUpOdds_sw,surveyAsked_sw,popupDelay_sw,iContent_sw); //Write JSON Cookie back out setCookie_sw('jsonCookie_sw', JSON.stringify(objJsonCookie_sw), 180); } } //Closed intercept in motion //Being Function Calls //-------------------- function checkTriggerPopup_001(AdViewFlag_sw,popUpOdds_sw,surveyAsked_sw,popupDelay_sw,iContent_sw) { if (noGo_sw==0) { if (AdViewFlag_sw==1) { var randomN_sw=randomRange_sw(); if (randomN_sw <= popUpOdds_sw) { if (surveyAsked_sw==0) { if (popupDelay_sw > 0) { setTimeout("showPopup_sw(iContent_sw)",parseFloat(popupDelay_sw) * 1000); } else if (passSegFlag_sw==1) { //showPopup_sw(iContent_sw); } else if (isExit_sw > 0) {dounload_001_sw();} else { showPopup_sw(iContent_sw); } } } } } } function writeIframe_sw_NEW(iframeSrc) { var iDiv = document.createElement('DIV'); //document.getElementsByTagName('body')[0].appendChild(iDiv); document.getElementsByTagName('body')[0].insertBefore(iDiv, document.getElementsByTagName('body')[0].firstChild); var iframe = new IFrame_sw(iDiv); iframe.src=iframeSrc; iframe.style.height="1px"; iframe.style.width="1px"; iframe.style.position="absolute"; iframe.style.top="-1000px"; } function writeIframe_sw(iframeSrc) { var iDiv = document.createElement('DIV'); document.getElementsByTagName('body')[0].appendChild(iDiv); var iframe = new IFrame_sw(iDiv); iframe.src=iframeSrc; } function showPopup_sw(iContent_sw) { //Check to see if exposure has happened since intercept was triggered //------------------------------------------------------------------- var strJsonCookieTemp_sw=getCookie_sw('jsonCookie_sw'); var objJsonCookieTemp_sw = JSON.parse(strJsonCookieTemp_sw); var exposedCookieValueTemp_sw=objJsonCookieTemp_sw[cn][pn].e; if ((exposedCookieValueTemp_sw==1) && (testType_sw==0)) {noGo_sw=1;} if (noGo_sw==1) {return false;} if (testType_sw==0) { adViewsTotal_sw=0; } else { adViewsTotal_sw=getAdViewsTotal_sw(objJsonCookie_sw[cn][pn]) } iContent_sw=iContent_sw.replace("&itype=","&adViewsTotal_sw=" + adViewsTotal_sw + "&adViews_sw=" + adViews_sw + "&itype=") var iDiv = parent.parent.document.createElement('DIV'); parent.parent.document.getElementsByTagName('body')[0].appendChild(iDiv); var iframe = new IFrame_sw(iDiv); if (deviceType_sw==2) { writeIContentM_sw(iframe,iContent_sw); } else { writeIContent_sw(iframe,iContent_sw); } if ((isPIM_sw==1) && (passSegFlag_sw != 1)) { webmd.p.pim.increment(); } objJsonCookie_sw[cn][pn].p = 1; //Write JSON Cookie back out setCookie_sw('jsonCookie_sw', JSON.stringify(objJsonCookie_sw), 180); } function writeIContent_sw(iframe,iContent_sw) { iframe.style.position='absolute'; iframe.style.left="450px"; iframe.style.top="100px"; iframe.style.width="450px"; iframe.style.height="529px"; iframe.style.zIndex=4999999; //iframe.style.backgroundColor="#f1f1f2"; if (passSegFlag_sw==1) { iframe.style.visibility="hidden"; } var div = iframe.doc.createElement("div"); div.innerHTML = iContent_sw; iframe.doc.body.appendChild(div); iframe.scrolling="no"; iframe.doc.getElementsByTagName('body')[0].style.overflow='hidden'; //iframe.doc.body.style.backgroundColor="#f1f1f2"; iframe.doc.body.style.margin="0px"; var script= document.createElement('script'); script.type= 'text/javascript'; script.src= 'https://www.surveywriter.net/in/iCloseFrame.js'; try { div.appendChild(script); } catch(err) { iframe.style.visibility="hidden"; } //iframe.style.width=div.childNodes[0].childNodes[1].clientWidth + 2; //iframe.style.height=div.childNodes[0].childNodes[1].clientHeight + 2; } function writeIContentM_sw(iframe,iContent_sw) { var screenWidth=screen.width var screenHeight=screen.height var viewportWidth=parent.window.innerWidth; var viewportHeight=parent.window.innerHeight; var leftPosition=(screenWidth/2) - (270/2) //iframe.style.position='absolute'; //iframe.style.left=leftPosition + "px"; //iframe.style.top="100px"; iframe.style.width="283px"; iframe.style.height="216px"; iframe.style.zIndex=4999999; iframe.style.backgroundColor="white"; iframe.style.position="absolute"; iframe.style.left=leftPosition + "px"; var winTop = parent.document.documentElement.scrollTop || parent.document.body.scrollTop; iframe.style.top=winTop + 100 + "px"; //var winTop = document.documentElement || document; //iframe.style.top=winTop.scrollTop + 100 + "px"; if (passSegFlag_sw==1) { iframe.style.visibility="hidden"; } var div = iframe.doc.createElement("div"); div.innerHTML = iContent_sw; iframe.doc.body.appendChild(div); iframe.scrolling="no"; iframe.doc.getElementsByTagName('body')[0].style.overflow='hidden'; iframe.doc.getElementsByTagName('body')[0].style.margin='0px'; //iframe.style.width=div.offsetWidth; //iframe.style.height=div.offsetHeight; var script= document.createElement('script'); script.type= 'text/javascript'; script.src= 'https://www.surveywriter.net/in/iCloseFrame.js'; try { div.appendChild(script); } catch(err) { iframe.style.visibility="hidden"; } //iframe.style.width=div.childNodes[0].childNodes[1].clientWidth + 15; //iframe.style.height=div.childNodes[0].childNodes[1].clientHeight + 35; } function IFrame_sw(parentElement) { // Create the iframe which will be returned var iframe = document.createElement("iframe"); iframe.frameBorder="0"; iframe.id="iPopFrame_sw"; iframe.name="iPopFrame_sw"; // If no parent element is specified then use body as the parent element if(parentElement == null) parentElement = parent.document.body; // This is necessary in order to initialize the document inside the iframe parentElement.appendChild(iframe); // Initiate the iframe's document to null iframe.doc = null; // Depending on browser platform get the iframe's document, this is only // available if the iframe has already been appended to an element which // has been added to the document if(iframe.contentDocument) // Firefox, Opera iframe.doc = iframe.contentDocument; else if(iframe.contentWindow) // Internet Explorer iframe.doc = iframe.contentWindow.document; else if(iframe.document) // Others? iframe.doc = iframe.document; // If we did not succeed in finding the document then throw an exception if(iframe.doc == null) throw "Document not found, append the parent element to the DOM before creating the IFrame"; // Create the script inside the iframe's document which will call the iframe.doc.open(); iframe.doc.close(); // Return the iframe, now with an extra property iframe.doc containing the // iframe's document return iframe; } //Cookie Functions //---------------- function setCookie_sw_Old(name, value, expiresDays, path, domain, secure) { path="/"; var CurrentDomain=document.domain; var now = new Date(); fixDate_sw(now); now.setTime(now.getTime() + expiresDays * 24 * 60 * 60 * 1000); expires=now; if (CurrentDomain.indexOf(".") > -1) { var arCurrentDomain=CurrentDomain.split("."); domain=arCurrentDomain[arCurrentDomain.length-2] + "." + arCurrentDomain[arCurrentDomain.length-1]; } else { domain=""; } var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); document.cookie = curCookie; } function setCookie_sw(name, value, expiresDays, path, domain, secure) { path="/"; var CurrentDomain=document.domain; var now = new Date(); fixDate_sw(now); now.setTime(now.getTime() + expiresDays * 24 * 60 * 60 * 1000); expires=now; if (CurrentDomain.indexOf(".") > -1) { var arCurrentDomain=CurrentDomain.split("."); domain=arCurrentDomain[arCurrentDomain.length-2] + "." + arCurrentDomain[arCurrentDomain.length-1]; } else { domain=""; } var curCookie = name + "=" + encodeValue_sw(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); document.cookie = curCookie; } function getCookie_sw_Old(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else begin += 2; var end = document.cookie.indexOf(";", begin); if (end == -1) end = dc.length; return unescape(dc.substring(begin + prefix.length, end)); } function getCookie_sw(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if (begin == -1) { begin = dc.indexOf(prefix); if (begin != 0) return null; } else begin += 2; var end = document.cookie.indexOf(";", begin); if (end == -1) end = dc.length; return decodeValue_sw(dc.substring(begin + prefix.length, end)); } function fixDate_sw(date) { var base = new Date(0); var skew = base.getTime(); if (skew > 0) date.setTime(date.getTime() - skew); } function query_sw(ji) { hu = searchString_sw; gy = hu.split("&"); for (i=0;i1) { return arrayStr[1]; } else { return "0"; } } function dounload_001_sw() { //!!modified for exit early //!!----------------------- if (isExit_sw==2) { iContent_sw=iContent_sw.replace(/iClose_sw\(1\)/g,"iClose_sw\(2\)"); winType=2; } //!!----------------------- if (objJsonCookie_sw[cn][pn].p == 1) {return false;} if (noGo_sw==0) { if (AdViewFlag_sw==1) { if (randomRange_sw() <= popUpOdds_sw) { if (!surveyAsked_sw) { if (deviceType_sw==2) { var popUpWindowFormat = "toolbar=no,directories=no,location=no,status=yes,menubar=no,resizable=yes,scrollbars=no,height=200,width=270,screenY=300,left=300,top=100"; } else { var popUpWindowFormat = "toolbar=no,directories=no,location=no,status=yes,menubar=no,resizable=yes,scrollbars=no,height=512,width=438,screenY=300,left=300,top=100"; } if (isPIM_sw==1) { webmd.p.pim.increment(); } var popwin = window.open("", "popwin", popUpWindowFormat); iContent_sw=iContent_sw + '<' + 'script type=text/javascript src="https://www.surveywriter.net/in/iCloseFrame.js">'; var popwinText="" + iContent_sw + "" popwin.document.write(popwinText); //Write JSON Cookie back out objJsonCookie_sw[cn][pn].p = 1; setCookie_sw('jsonCookie_sw', JSON.stringify(objJsonCookie_sw), 180); } } } } } function triggerSW(theSeg) { if (typeof(theSeg) != 'undefined') { segValue_sw = theSeg; } else { segValue_sw = -1; } if (noGo_sw==1) {return false;} if (popUpOdds_sw==0) {return false;} if (popupDelayR_sw > 0) { setTimeout("triggerSW(" + segValue_sw + ")",parseFloat(popupDelayR_sw) * 1000); popupDelayR_sw=0; return; } showPopup_sw(iContent_sw); if (parent.parent.document.getElementById('iPopFrame_sw') == null) {return false;} parent.parent.document.getElementById('iPopFrame_sw').style.visibility="visible"; objJsonCookie_sw[cn][pn].p = 1; setCookie_sw('jsonCookie_sw', JSON.stringify(objJsonCookie_sw), 180); if (isPIM_sw==1) { webmd.p.pim.increment(); } } function getDate_sw(expireDays) { var atDate=new Date(); atDate.setDate(atDate.getDate()+expireDays) var vDate=atDate.valueOf(); vDate=Math.round(vDate/1000/60/60/24) return vDate; } //Destroy cookie values for this project if past expire date function destroyCookie() { var atDate_sw=new Date(); var vDate_sw=atDate_sw.valueOf(); vDate_sw=Math.round(vDate_sw/1000/60/60/24) var expireDate_sw=objJsonCookie_sw[cn][pn].x; if (vDate_sw > expireDate_sw) { noGo_sw=1; delete objJsonCookie_sw[cn][pn]; setCookie_sw('jsonCookie_sw', JSON.stringify(objJsonCookie_sw), 180); } } function encodeValue_sw(value) { return encodeURIComponent(value).replace( // { %7B // } %7D // : %3A // [ %5B // ] %5D // " %22 // , %2C /%7B|%7D|%3A|%5B|%5D|%22|%2C/g, // Replacement function for any match of the regular expression function(s){ return decodeURIComponent(s) } ); } function decodeValue_sw(value) { return decodeURIComponent(value); } function getAdViewsTotal_sw(obj) { var adViewsTotal_sw=0; for (var name in obj) { if (name.substr(0,2)=='at') { adViewsTotal_sw=adViewsTotal_sw + obj[name]; } } return adViewsTotal_sw; } //!!!***Breaks out of same domain iframe //!!!***_______________________________________ function writeInterceptScriptParent() { var div = parent.document.createElement("div"); div.id="iDiv_sw"; parent.document.getElementsByTagName('body')[0].appendChild(div); var script= document.createElement('script'); script.type= 'text/javascript'; for (var i = 0; i < document.getElementsByTagName('script').length; i++) { var sSrc=document.getElementsByTagName('script')[i].src; if (sSrc.indexOf("surveywriter") > -1) { script.src= sSrc; break; } } div.appendChild(script); } function getDevice_sw(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) {return 2} else {return 1}}