try{
"".stripScripts();
}
catch(e){
String.prototype.stripScripts=function(){
var s=this;
var r="",p,q;
while((p=s.toLowerCase().indexOf("<script"))>=0){
r+=s.substr(0,p);
q=s.toLowerCase().indexOf("</script",p);
if(q<0){
return r;
}
s=s.substr(q+9);
}
r+=s;
return r;
};
if("a<script>b</script>c<script>d</script>e".stripScripts()!="ace"){
alert("String.stripScripts unsupported");
}
String.prototype.extractScripts=function(){
var s=this;
var r=[],p,q;
while((p=s.toLowerCase().indexOf("<script"))>=0){
s=s.substr(p);
q=s.indexOf(">",p);
if(q<0){
q=p;
}else{
p=q+1;
q=s.toLowerCase().indexOf("</script",p);
if(q<0){
q=s.length;
}
r.push(s.substr(p,q-p));
}
s=s.substr(q+9);
}
return r;
};
if("a<script>b</script>c<script>d</script>e".extractScripts().join(",")!="b,d"){
alert("String.extractScripts unsupported");
}
}

