//no right click
 var debug = true;
function right(e) 
{
if (navigator.appName == 'Firefox' && (e.which == 3 || e.which == 2)) return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2 || event.button == 3)) {
alert('This Page is fully protected!');
return false;
}

return true;
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=right;


function disableselect(e){ 
return false 
} 

function reEnable(){ 
return true 
} 

//if IE4+ 
document.onselectstart=new Function ("return false") 
document.oncontextmenu=new Function ("return false") 
//if NS6 
if (window.sidebar){ 
document.onmousedown=disableselect 
document.onclick=reEnable 
} 

//add to favourites
var urlAddress = "http://www.aughtbit.com";
 var pageName = "Aught Bit Technologies - IT solutions provider & Outsource Firm in Calcutta, WB, INDIA specialising in Web development,  Multimedia and CD developments, Graphic Design, Brochure Design, Logo Design.";

 function addToFavorites()
 {
  if (window.external)
  {
   window.external.AddFavorite(urlAddress,pageName)
  }
  else
  { 
   alert("Sorry! Your browser doesn't support this function.");
  }
 }



//random images
    var ic = 1;     // Number of alternative images
    var xoxo = new Array(ic);  // Array to hold filenames
        
xoxo[0] = "images/main_pic5.jpg";





function pickRandom(range) {
if (Math.random)
return Math.round(Math.random() * (range-1));
else {
var now = new Date();
return (now.getTime() / 1000) % range;
}
}

var choice = pickRandom(ic);



//quick link
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;}


  //new pop up window
function MM_openBrWindow(theURL,winName,features) { 
  window.open(theURL,winName,features);

}

//form validation
function checkFields() {
missinginfo = "";
if (document.form.name.value == "") {
missinginfo += "\n     -  Name";
}
if ((document.form.email.value == "") || 
(document.form.email.value.indexOf('@') == -1) || 
(document.form.email.value.indexOf('.') == -1)) {
missinginfo += "\n     -  Email address";
}
if ((document.form.website.value == "") || 
(document.form.website.value.indexOf("http://") == -1) || 
(document.form.website.value.indexOf(".") == -1)) {
missinginfo += "\n     -  Web site";
}
if(document.form.comments.value == "") {
missinginfo += "\n     -  Comments";
}

if (missinginfo != "") {
missinginfo ="_____________________________\n" +
"Field is empty or You failed to correctly fill in your:\n" +
missinginfo + "\n_____________________________" +
"\nPlease re-enter it and submit again!";
alert(missinginfo);
return false;
}
else return true;
}



//Get Date
var months=new Array(13);
months[1]="January";
months[2]="February";
months[3]="March";
months[4]="April";
months[5]="May";
months[6]="June";
months[7]="July";
months[8]="August";
months[9]="September";
months[10]="October";
months[11]="November";
months[12]="December";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000) 
year = year + 1900; 

//Get Time
var now = new Date();
var hours = now.getHours();
var minutes = now.getMinutes()
var timeValue = "" + ((hours >12) ? hours -12 :hours)
if (timeValue == "0") timeValue = 12;
timeValue += ((minutes < 10) ? ":0" : ":") + minutes
timeValue += (hours >= 12) ? " PM" : " AM"

//Get Day
var days=new Array(7);
days[0]="Sunday";
days[1]="Monday";
days[2]="Tuesday";
days[3]="Wednesday";
days[4]="Thursday";
days[5]="Friday";
days[6]="Saturday";
var lday=days[time.getDay()];




