<!--
	function chk_rad(t, n, msg) {
		for (var i=0; i<n; i++) {
			if (t[i].checked!="0") return true;
		}
		alert(msg);
		return false;
	}
   
	function chk_text(t, msg) {
		if (t.value != '') return true;
		alert(msg);
		t.focus();
		return false;
	}
	
	function chk_select(t, msg) {
		if (t.selectedIndex != 0) return true;
       	alert(msg);
		t.focus();
		return false;
	}
	
	function chk_text_email(t, msg) {
      if (t.value != '') {
        var at = t.value.indexOf('@', 0);
        if (at > 1 && t.value.lastIndexOf('.') > at) {
           return true;
        }
       }
       alert(msg);
       t.focus();
       t.select();
       return false;
   }
   
   function chk_box(t, msg) {
       if (t.checked) return true;
       alert(msg);
       return false;
   }
   
   function chk_textPassword(t, s, msg) {
		if(s.value == t.value) return true;
		alert(msg);
		s.focus();
		return false;
	}
	
	function chk_number(t, msg){
		var valid = "0123456789";
		var tt = t.value;
		for (var i=0; i < tt.length; i++) {
			temp = "" + tt.substring(i, i+1);
			if (valid.indexOf(temp) == "-1"){
				alert(msg);
				t.focus();
				return false;	
			}
		}	
		return true;
	}
	
	function chk_NumofChar(t, msg, num){
		if(t.value.length > num) return true;
		alert(msg);
		t.focus();
		return false;
	}
		
	function OnKeyPressForTest(){
  		// to allow 0-9 numeric digit in the input field
  		if( event.keyCode < 48 || event.keyCode > 57 ) event.returnValue = false;
	}
	
	function alertmsg(tclick, url){
		var a = confirm("Are you sure you want to "+tclick+" this remarks?", "Yes", "No")
		if (a == true) {
			window.location.href = url;
		}
	}
	
	function popWin(m) {
	
		switch(m){
         	case 1: popWin2('availability.htm', 'Availability', 'yes', 600, 450);break;
         	case 2: popWin2('pricing.htm', 'Pricing', 'yes', 600, 450);break;
         	case 3: popWin2('application.htm', 'Application', 'no', 600, 450);break;
         }
	}
	
	function popWin2(Page,Title,scrbar,w,h) {
	
		LPos = (screen.width - w)/2;
		TPos = (screen.height - h)/2;
	
		window.open(Page,Title,"height="+h+",width="+w+",scrollbars="+scrbar+",resizable=no,maximize=no,left="+LPos+", top="+TPos);
	
	}
	
	function goTo(popThrough) {
		if (!window.opener){
			self.open(popThrough)
		} else if (window.opener.closed){
			window.open(popThrough);
			window.close();
		} else {
			window.opener.location.href = popThrough;
			//window.close();
		}
	}
	
	function MM_callJS(jsStr) { //v2.0
  		return eval(jsStr)
	}
   
   function sendIt(fileName) {
      //If the selected file name isn't blank, send it to reader.
      if (fileName != "") {
         location.href=fileName
      }
   }
   
   	function OpenURL(URL, Title){
   		window.open(URL, Title);
   	}
   	
   	function OpenURL2(URL){
   		window.location.href= URL
   	}
   
   function QuickLink_S(fileName) {
      //If the selected file name isn't blank, send it to reader.
      if (fileName != "") {
         switch(fileName){
         	case "1": popWin('../smartnet/index.asp?id=1', 'SmartNet', 'no', 600, 450);break;
         	case "2": popWin('../smartnet/index.asp?id=2', 'SmartNet', 'no', 600, 450);break;
         	case "3": popWin('../smartnet/index.asp?id=3', 'SmartNet', 'no', 600, 450);break;
         	case "4": popWin('../smartnet/index.asp?id=4', 'SmartNet', 'no', 600, 450);break;
         	case "5": popWin('../smartnet/index.asp?id=5', 'SmartNet', 'no', 600, 450);break;
         	case "6": popWin('../smartnet/index.asp?id=6', 'SmartNet', 'no', 600, 450);break;
         	case "7": popWin('../smartnet/index.asp?id=7', 'SmartNet', 'no', 600, 450);break;
			case "8": OpenURL('http://monitor.dclisp.com:8002', 'Register'); break;
			case "9": OpenURL('http://monitor.dclisp.com:8001', 'Refill'); break;
			case "10": OpenURL('http://monitor.dclisp.com', 'Monitor'); break;
			case "11": popWin('../smartnet/faq.htm', 'FAQ', 'yes', 600, 450); break;
         }
      }
   }
   
   function QuickLink_AM(fileName) {
      //If the selected file name isn't blank, send it to reader.
      if (fileName != "") {
         switch(fileName){
			case "1": OpenURL2('../aboutmauritius/index.asp?sc=1'); break;
			case "2": OpenURL2('../aboutmauritius/index.asp?sc=2'); break;
			case "3": OpenURL2('../aboutmauritius/index.asp?sc=3'); break;
			case "4": OpenURL2('../aboutmauritius/index.asp?sc=4'); break;
         }
      }
   }
   
   function row_over(eRow, bcolor){
      eRow.style.backgroundColor = bcolor;
      eRow.style.cursor = "hand";
    }

    function row_out(eRow, bgcolor){
    	if(bgcolor ==''){
      		eRow.style.backgroundColor = "#EBEBEB";
      	} else {
      		eRow.style.backgroundColor = bgcolor;
      	}
      	eRow.style.cursor = "auto";
    }
    
    function td_over(eRow, aRow, bRow, cRow, aColor, bColor, cColor){
      aRow.style.backgroundColor = aColor;
      bRow.style.backgroundColor = bColor;
      cRow.style.backgroundColor = cColor;
      eRow.style.cursor = "hand";
    }

    function td_out(eRow, aRow, bRow, cRow){
    	aRow.style.backgroundColor = "#8EA3D4";
      	bRow.style.backgroundColor = "#768DC1";
      	cRow.style.backgroundColor = "#005198";
      	eRow.style.cursor = "auto";
    }
    
    function adRotator(){
    	URL = new Array(4);
		image = new Array(4);

		URL[0] = "#";
		image[0] = "http://localhost/smtportal/images/banners/smt_280703_468_60.gif";

		URL[1] = "#";
		image[1] = "http://localhost/smtportal/images/banners/compaq_evo.gif";
		
		URL[2] = "#";
		image[2] = "http://localhost/smtportal/images/banners/thedell2_468_60.gif";
		
		URL[3] = "#";
		image[3] = "http://localhost/smtportal/images/banners/meccerpro_468_60.gif";

		index = Math.floor(Math.random() * image.length);
		tbanner = "<A href=" + URL[index] + "><img border=0 src=" + image[index] + "></A>";
		return (tbanner);
		//document.write("<A href=" + URL[index] + "><img border=0 src=" + image[index]></A>");
    }
    
	function rotAd(){
		obj = new Array(2);

		obj[0] = "cards/pr_28_07_2003.swf";
		obj[1] = "misc/C540.swf";
		
		index = Math.floor(Math.random() * obj.length);
		//tbanner = "<A href=" + URL[index] + "><img border=0 src=" + image[index] + "></A>";
		//return (tbanner);
		document.write("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
		document.write("codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0'");
		document.write(" WIDTH='456' HEIGHT='180' id='ad' ALIGN=''>");
		document.write(" <PARAM NAME=movie VALUE='promo/" + obj[index] + "'> <PARAM NAME=loop VALUE=false> <PARAM NAME=menu VALUE=false> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> ");
		document.write(" <EMBED src='promo/" + obj[index] + "' loop=false menu=false quality=high bgcolor=#FFFFFF  WIDTH='456' HEIGHT='180' NAME='ad' ALIGN=''");
		document.write(" TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/go/getflashplayer'></EMBED></OBJECT>");
		//return tAd;
    }
    
    function writeWindowStatus(){

		var now = new Date();
		var then = new Date("August 29, 2003");
		var gap = then.getDate() - now.getDate();

		gap = "J - "+gap

		return(gap);

	}
		
//-->
