function validateForm(_1){
if(_1.name.value==""){
alert("Please enter your name.");
_1.name.focus();
return false;
}
if(_1.email.value==""){
alert("Please enter your email address.");
_1.email.focus();
return false;
}
function echeck(str){
var at="@"
var dot="."
var lat=str.indexOf(at)
var lstr=str.length
var ldot=str.indexOf(dot)
if (str.indexOf(at)==-1){
alert("Enter a valid email.")
_1.email.focus();
return false
}
if(str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
alert("Enter a valid email.")
_1.email.focus();
return false
}
if(str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
alert("Enter a valid email.")
_1.email.focus();
return false
}
if(str.indexOf(at,(lat+1))!=-1){
alert("Enter a valid email.")
return false
}
if(str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
alert("Enter a valid email.")
_1.email.focus();
return false
}
if(str.indexOf(dot,(lat+2))==-1){
alert("Enter a valid email.")
_1.email.focus();
return false
}
if(str.indexOf(" ")!=-1){
alert("Enter a valid email.")
_1.email.focus();
return false
}
return true					
}
if(echeck(_1.email.value)==false){
_1.email.value=""
_1.email.focus()
return false
}
if(_1.subject.value==""){
alert("Please enter a subject.");
_1.subject.focus();
return false;
}
if(_1.message.value==""){
alert("Please enter a message.");
_1.message.focus();
return false;
}
return true;
}
function ct(){
document.getElementById("em").firstChild.nodeValue="sales@mag"+"ictracer.com";
document.getElementById("em").setAttribute("href","mailto:sales@mag"+"ictracer.com");
}
var Fat={make_hex:function(r,g,b){
r=r.toString(16);
if(r.length==1){
r="0"+r;
}
g=g.toString(16);
if(g.length==1){
g="0"+g;
}
b=b.toString(16);
if(b.length==1){
b="0"+b;
}
return "#"+r+g+b;
},fade_all:function(){
var a=document.getElementsByTagName("*");
for(var i=0;i<a.length;i++){
var o=a[i];
var r=/fade-?(\w{3,6})?/.exec(o.className);
if(r){
if(!r[1]){
r[1]="";
}
if(o.id){
Fat.fade_element(o.id,null,null,"#"+r[1]);
}
}
}
},fade_element:function(id,_a,_b,_c,to){
if(!_a){
_a=30;
}
if(!_b){
_b=3000;
}
if(!_c||_c=="#"){
_c="#6f76a2";
}
if(!to){
to=this.get_bgcolor(id);
}
var _e=Math.round(_a*(_b/1000));
var _f=_b/_e;
var _10=_f;
var _11=0;
if(_c.length<7){
_c+=_c.substr(1,3);
}
if(to.length<7){
to+=to.substr(1,3);
}
var rf=parseInt(_c.substr(1,2),16);
var gf=parseInt(_c.substr(3,2),16);
var bf=parseInt(_c.substr(5,2),16);
var rt=parseInt(to.substr(1,2),16);
var gt=parseInt(to.substr(3,2),16);
var bt=parseInt(to.substr(5,2),16);
var r,g,b,h;
while(_11<_e){
r=Math.floor(rf*((_e-_11)/_e)+rt*(_11/_e));
g=Math.floor(gf*((_e-_11)/_e)+gt*(_11/_e));
b=Math.floor(bf*((_e-_11)/_e)+bt*(_11/_e));
h=this.make_hex(r,g,b);
setTimeout("Fat.set_bgcolor('"+id+"','"+h+"')",_10);
_11++;
_10=_f*_11;
}
setTimeout("Fat.set_bgcolor('"+id+"','"+to+"')",_10);
},set_bgcolor:function(id,c){
var o=document.getElementById(id);
o.style.backgroundColor=c;
},get_bgcolor:function(id){
var o=document.getElementById(id);
while(o){
var c;
if(window.getComputedStyle){
c=window.getComputedStyle(o,null).getPropertyValue("background-color");
}
if(o.currentStyle){
c=o.currentStyle.backgroundColor;
}
if((c!=""&&c!="transparent")||o.tagName=="BODY"){
break;
}
o=o.parentNode;
}
if(c==undefined||c==""||c=="transparent"){
c="#ffffff";
}
var rgb=c.match(/rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)/);
if(rgb){
c=this.make_hex(parseInt(rgb[1]),parseInt(rgb[2]),parseInt(rgb[3]));
}
return c;
}};
window.onload=function(){
Fat.fade_all("alert");
ct();
};