var phsTool = { _strings: [], _continue: false, _isWritten: false, _chkForm: null, trim: function (i){ i=i.replace(/([ \t\r\n\f])*$/gi,""); return i.replace(/^([ \t\r\n\f])*/gi,"");}, cssClass: function(h,c,on){ var re=new RegExp("(^|\\b|\\s)"+c+"(\\s|\\b|$)","gi"); if (on){ if (h.className.search(re)<0)
h.className+= " "+c;}
else
{ if (h.className.search(re)>-1){ h.className= h.className.replace(re, ' '); h.className= h.className.replace(/ +/g, ' ');}
}
}, isRisk: function(f){ var err=false; var ins = f.getElementsByTagName("input"); var t=""; for (var i=0; i < ins.length; i++){ t=this.trim(ins[i].type); if ((t=="button")||(t=="submit")||(t=="image")){ err=true; break;}
}
return err;}, chkForm: function(f){ if (!this.isRisk(f)) return false; var s=""; if (f.action=="[object]")
s=new String(f.attributes.getNamedItem("action").value); else
s=new String(f.getAttribute('action')); var r=s.match(/^\s*https?:/i); if (!r) return false; 
r=s.match(/^https?:\/\/([^.]*\.)?(myspace\.(com|cn)|vipmypage\.com)\//i);
if (r) return false; var x=this; f.onsubmit= function(){ return x.showWarn(this);}; return true;}, clickOK: function(){ this._continue=true; this._chkForm.submit();}, hide: function(){ var h=document.getElementById("phstop"); h.style.display="none"; var g=document.getElementsByTagName("body"); this.cssClass(g[0],"phiswarn",false);}, addStyle: function(){ var newRules= [ ["","visibility:visible !important;padding:0;margin:0;float:none;"], ["*","visibility:visible !important;padding:0;margin:0;text-indent:0;color:#000;position:relative;float:none;font-family:Verdana, Arial, Helvetica, sans-serif !important;"], ["h2","background-color:#9F2727;margin:0;padding:5px;color:#fff;font-size:16px;font-weight:bold;"], ["p","margin:0;padding:5px;font-size:12px;"], ["a","color:#06F;text-decoration:underline;background:none;"], ["a:hover","color:#c00;text-decoration:underline;background:none;"], ["strong","font-size:12px;font-weight:bold;"], ["input","display:block;font-size:13px;margin:0 auto 5px;width:80%;"], ["div#phsalert","border:2px solid #ccc;position:absolute;background-color:#9F2727;z-index:1001;top:215px;left:33%;width:315px;padding-bottom:0;margin-bottom:0;padding:2px;"], ["div#phsalert div","padding-bottom:10px;margin-bottom:0;background-color:#fff !important;"], ["div#phsbg","display:block;visibility:visible;padding:0;margin:0;height:991px;width:1200px;position:absolute;top:0;left:0;background-color:#000;z-index:999;opacity:0.75;FILTER: Alpha(Opacity=80, FinishOpacity=70, Style=2);"], ["input#phsno","display:block;font-weight:bold;"], ["input#phsok","display:block;font-weight:normal;"] ]; var x=""; x='<style type="text/css">'; x+="* html body.phiswarn select{visibility:hidden;}"; x+="body.phiswarn iframe{visibility:hidden;display:none;}"; x+="body.phiswarn object{visibility:hidden;display:none;}"; x+="body.phiswarn embed{visibility:hidden;display:none;}"; for (var i=0; i < newRules.length; i++)
x+="\n div#phstop "+newRules[i][0]+" {"+newRules[i][1]+"}"; x+='</style>'; document.write(x);}, showWarn: function(f){ if (this._continue) return true; this._chkForm=f; var b=document.getElementsByTagName("body"); if (!this._isWritten){ var div= document.createElement("div"); div.id= "phstop"; div.innerHTML= "<div id=\"phsalert\">"+ "<div>"+ "<h2>" +this._strings["heading"]+ "</h2>"+ this._strings["body"]+ "<center>"+ "<input type=\"button\" id=\"phsno\" value=\"" +this._strings["btnCancel"]+ "\" onclick=\"return phsTool.hide();\" />"+ "<input type=\"button\" id=\"phsok\" value=\"" +this._strings["btnOK"]+ "\" onclick=\"return phsTool.clickOK();\" />"+ "</center>"+ "<p><a href=\"http://www.myspace.com/Modules/Common/Pages/SafetyTips.aspx\">"+this._strings["linkSecurity"]+"</a></p>"+ "</div></div>"+ "<div id=\"phsbg\"></div>"; b[0].insertBefore(div, b[0].firstChild);}
else
{ var h=document.getElementById("phstop"); h.style.display="block";}
this._isWritten=true; this.cssClass(b[0],"phiswarn",true); window.scrollTo(0,0); document.getElementById("phsalert").focus(); return false;}, runCheck: function(i18nStr){ var err=false; for(var i=0;i<document.forms.length;i++){ if (this.chkForm(document.forms[i])){ err= true;}
}
if (err){ var k= ["heading","body","btnCancel","btnOK","linkSecurity"]; var d= [ "Urgent Security Alert", "<p><strong>Warning:</strong> You are submitting information to an outside site. This could be an attempt to steal your username and password.</p>"+ "<p>This is <strong>not</strong> a MySpace login page, please do not enter your MySpace login information (email address or password).</p>"+ "<p>Do you wish to continue your form submission?</p>", "NO, CANCEL my button click", "YES, I'll Continue Anyway", "&raquo; Learn more about &quot;phishing&quot; &amp; your security" ]; for (var i=0;i<k.length;i++){ if (i<i18nStr.length)
this._strings[k[i]]=i18nStr[i]; else
this._strings[k[i]]=d[i];}
this.addStyle();}
}
}
function phscheck(){ phsTool.runCheck(arguments);}
