var BaseHref="http://www.uslawnet.com/"
var strLoc=location.href;
//var intPosE=strLoc.indexOf("Englishhome");
var intPos=strLoc.indexOf("Chinesehome");
//automatically generate three top images (English and Chinese texts)
function topImages(){
document.write('<table width="100%" height="60" cellpadding="0" cellspacing="0" border="0" align="right">');
if(intPos>=0){
document.write('<tr><td align="right" height="20">');
document.write('<a href="'+BaseHref+'Chinesehome\/chinesehome.htm" class="topmenu">');
document.write('<img src="'+BaseHref+'images\/home.gif" width="16" height="16" alt="Go Back to Home" border="0" align="absbottom"> 首页<\/a>');
document.write('<\/td><\/tr>');
document.write('<tr><td align="right" height="20">');
document.write('<a href="Javascript: window.external.AddFavorite(\'http://www.xielaw.com\', \'谢正权律师事务所\')" class="topmenu">');
document.write('<img src="'+BaseHref+'images\/favorite.gif" width="16" height="16" alt="Add to Favorite" border="0" align="absbottom"> 收藏<\/a>');
document.write('<\/td><\/tr>');
document.write('<tr><td align="right" height="20">');
document.write('<a href="'+BaseHref+'search.htm" class="topmenu">');
document.write('<img src="'+BaseHref+'images\/search.gif" width="16" height="16" alt="Search this site" border="0" align="absbottom"> 搜索<\/a>');
document.write('<\/td><\/tr>');
}
else{
document.write('<tr><td align="right" height="20">');
document.write('<a href="'+BaseHref+'default.htm" class="topmenu">Home ');
document.write('<img src="'+BaseHref+'images\/home.gif" width="16" height="16" alt="Go Back to Home" border="0" align="absbottom"><\/a>');
document.write('<\/td><\/tr>');
document.write('<tr><td align="right" height="20">');
document.write('<a href="Javascript: window.external.AddFavorite(\'http://www.xielaw.com\', \'Xie Law Offices, LLC.\')" class="topmenu">');
document.write('Favorite <img src="'+BaseHref+'images\/favorite.gif" width="16" height="16" alt="Add to Favorite" border="0" align="absbottom"><\/a>');
document.write('<\/td><\/tr>');
document.write('<tr><td align="right" height="20">');
document.write('<a href="'+BaseHref+'search.htm" class="topmenu">Search ');
document.write('<img src="'+BaseHref+'images\/search.gif" width="16" height="16" alt="Search this site" border="0" align="absbottom"><\/a>');
document.write('<\/td><\/tr>');
}
document.write('<\/table>');
}

//automatioally generate English or Chinese Top Root Menu
function topMenu(){
if(intPos>=0){
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\'" align="CENTER" height="20" onclick="location=\''+BaseHref+'default.htm\'">');
document.write('<a href="'+BaseHref+'default.htm" class="topmenu" title="Home Page"><img src="'+BaseHref+'images\/english.gif" width="50" height="12" border="0" alt="English Version"><\/a><\/TD>');       
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\'" align="CENTER" onclick="location=\''+BaseHref+'Englishhome/status_check.htm\'">');
document.write('<a href="'+BaseHref+'Englishhome/status_check.htm" class="topmenu" title="Status Checking">客户登录<\/a><\/td>');    document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';PopMenu(\'PopMenu4\',event);this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\';OutMenu(\'PopMenu4\')" align="CENTER" height="20" onclick="location=\''+BaseHref+'Chinesehome\/Firm\/ourfirm.htm\'">');
document.write('<div id="TopMenu1"><a href="'+BaseHref+'Chinesehome\/Firm\/ourfirm.htm" class="topmenu" title="Our Firm">律师所<\/a><defa\/div><\/td>');
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';PopMenu(\'PopMenu5\',event);this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\';OutMenu(\'PopMenu5\')" align="CENTER" onclick="location=\''+BaseHref+'Chinesehome\/Services\/ourservice.htm\'">');
document.write('<div id="TopMenu2"><a href="'+BaseHref+'Chinesehome\/Services\/ourservice.htm" class="topmenu" title="Our Service">服务项目<\/a><\/div><\/td>');       
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';PopMenu(\'PopMenu6\',event);this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\';OutMenu(\'PopMenu6\')" align="CENTER" onclick="location=\''+BaseHref+'WaitingTimes\/Waitingtimes.htm\'">');
document.write('<div id="TopMenu3"><a href="'+BaseHref+'WaitingTimes\/Waitingtimes.htm" class="topmenu" title="Waiting Time">等待时间<\/a><\/div><\/td>');       
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\'" align="CENTER" onclick="location=\''+BaseHref+'Library\/library.htm\'">');
document.write('<a href="'+BaseHref+'Library\/library.htm" class="topmenu" title="Reference Library(password required)">法律资料<\/a><\/td>');
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\'" align="CENTER" onclick="location=\''+BaseHref+'Englishhome/links.htm\'">');        
document.write('<a href="'+BaseHref+'Englishhome/links.htm" class="topmenu" title="Other Links">有用链接<\/a><\/td>');       
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\'" align="CENTER" onclick="location=\''+BaseHref+'Chinesehome\/News\/news.htm\'">');
document.write('<a href="'+BaseHref+'Chinesehome\/News\/news.htm" class="topmenu" title="Immigration News">移民新闻<\/a><\/td>');
}
//English top menu
else{
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\'" align="CENTER" height="20" onclick="location=\''+BaseHref+'Chinesehome/chinesehome.htm\'">');
document.write('<a href="'+BaseHref+'Chinesehome/chinesehome.htm" class="topmenu" title="Home Page"><img src="'+BaseHref+'\/images\/chinese.gif" width="50" height="12" border="0" alt="Chinese Version"><\/a><\/TD>');       
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\'" align="CENTER" onclick="location=\''+BaseHref+'Englishhome/status_check.htm\'">');
document.write('<a href="'+BaseHref+'Englishhome/status_check.htm" class="topmenu" title="Client Login">Client Login<\/a><\/td>'); 
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';PopMenu(\'PopMenu1\',event);this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\';OutMenu(\'PopMenu1\')" align="CENTER" height="20" onclick="location=\''+BaseHref+'Englishhome\/Firm\/ourfirm.htm\'">');
document.write('<div id="TopMenu1"><a href="'+BaseHref+'Englishhome\/Firm\/ourfirm.htm" class="topmenu" title="Our Firm">Our Firm<\/a><\/div><\/td>');
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';PopMenu(\'PopMenu2\',event);this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\';OutMenu(\'PopMenu2\')" align="CENTER" onclick="location=\''+BaseHref+'Englishhome\/Services\/ourservice.htm\'">');
document.write('<div id="TopMenu2"><a href="'+BaseHref+'Englishhome\/Services\/ourservice.htm" class="topmenu" title="Our Service">Our Service<\/a><\/div><\/td>');       
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';PopMenu(\'PopMenu3\',event);this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\';OutMenu(\'PopMenu3\')" align="CENTER" onclick="location=\''+BaseHref+'WaitingTimes\/Waitingtimes.htm\'">');
document.write('<div id="TopMenu3"><a href="'+BaseHref+'WaitingTimes\/Waitingtimes.htm" class="topmenu" title="Waiting Time">Waiting Time<\/a><\/div><\/td>');       
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\'" align="CENTER" onclick="location=\''+BaseHref+'Library\/library.htm\'"">');
document.write('<a href="'+BaseHref+'Library\/library.htm" class="topmenu" title="Reference Library(password required)">Law Library<\/a><\/td>');
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\'" align="CENTER" onclick="location=\''+BaseHref+'Englishhome/links.htm\'">');        
document.write('<a href="'+BaseHref+'Englishhome/links.htm" class="topmenu" title="Other Links">Useful Links<\/a><\/td>');       
document.write('<TD nowrap onmouseover="this.style.backgroundColor=\'#95c3d1\';this.style.cursor=\'hand\'" onmouseout="this.style.backgroundColor=\'#f3f3f3\'" align="CENTER" onclick="location=\''+BaseHref+'Englishhome\/News\/news.htm\'">');
document.write('<a href="'+BaseHref+'Englishhome\/News\/news.htm" class="topmenu" title="Immigration News">Immigration News<\/a><\/td>');
}
}

//automatioally generate English or Chinese scroll news
function scrollNews(){
if(intPos>=0){
document.write('<marquee scrolldelay="100" border="0" scrollamount="5" style="font-weight: bold; color: #4f7683" bgcolor="#FFFFFF" width="640" height="16" onMouseOver="this.stop()" onMouseOut="this.start()">');
document.write('            公告: Our clients have both: reliable legal service and affordable rates!   '); 
document.write('            H-1B application: From $1000; Green card application: From $3,500... Click &quot;Our Service&quot; then ');
document.write('&quot;<a href=\'https://egov.immigration.gov/graphics/cris/jsps/caseStat.jsp\'>Our Fees</a>&quot; below or call (678) 380-0698 for more details!');
document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;')
document.write('We have the fastest PERM labor certification approvals <a href=\http://www.uslawnet.com/Englishhome/PERM/PERM.htm\' target=\'_blank\'>for your review</a> online!</marquee>');  
}

else{
document.write('<marquee scrolldelay="100" border="0" scrollamount="5" style="font-weight: bold; color: #4f7683" bgcolor="#FFFFFF" width="640" height="16" onMouseOver="this.stop()" onMouseOut="this.start()">');
document.write('            News: Our clients have both: reliable legal service and affordable rates!   '); 
document.write('            H-1B application: From $1000; Green card applications: from $3,500... Click &quot;Our Service&quot; then ');
document.write('&quot;<a href=\'http://www.uslawnet.com/Englishhome/Services/fees.htm\'>Our Fees</a>&quot; below or call (678) 380-0698 for more details!');
document.write('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;')
document.write('We have the fastest PERM labor certification approvals <a href="http://www.uslawnet.com/Englishhome/PERM/PERM.htm" target="_blank">for your review</a> online!</marquee>'); 
}
}


//date/time display function
function isnArray() {
 for (var i=0;i<isnArray.arguments.length;i++) {
  this[i+1] = isnArray.arguments[i];
  }
 }
 
// And months and day arrays
var isnMonths=new isnArray("January","February","March","April","May","June","July","August","September","October","November","December");
var isnDays= new isnArray("Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");
isnDays[0]="Sunday";

function showMenuTime()
{
var d = new Date();                // month day, year hours:minutes:seconds
var mo = d.getMonth() + 1;         // extract months: January to December                  
var da = d.getDate();              // extract days: 1 to 31
//var t = isnDays[d.getDay()] + '<br> ' + isnMonths[d.getMonth() + 1]+ ' '+ da + ', ' + d.getYear();   // put it all together
var t = isnMonths[d.getMonth() + 1]+ ' '+ da + ', ' + d.getYear();   // put it all together
document.write ("<div class=menuTime>"+t+"</div>")
}

//added by Chao for content protection
var ns = (document.layers)? true:false;
var ie = (document.all)? true:false;
if (ns) document.captureEvents(Event.MOUSEDOWN || Event.CLICK);
//document.onclick = disableRightClick;
//document.onmousedown = disableRightClick;
//document.body.oncontextmenu =  sourcecodeprotect;
//document.body.ondragstart = sourcecodeprotect;
//document.body.onselectstart = sourcecodeprotect;
// ***********************************************************
function disableRightClick(e) {
  if (ns&&(e.which==3)) {
   alert("All Copyrights Reserved by Xie Law Office LLC. 2000-2005\n Please notify us in writing if you want to re-distribute the content. Thanks\n\nWebmaster -- Xielaw.com");
  return false;}
  else if (ie&&(window.event.button==2)) {
  alert("All Copyrights Reserved by Xie Law Office LLC. 2000-2005\n Please notify us in writing if you want to re-distribute the content. Thanks\n\nWebmaster -- Xielaw.com");
  return false;}
  else return true;
  }
function sourcecodeprotect(e) {
   return false;
  }
//***********************************************************
function cleanup() {
  if (ns) document.releaseEvents(Event.MOUSEDOWN || Event.CLICK);
  }
document.onunload = cleanup;