var calobj;
var firstyear =1950;
//var lastyear = 2020;
 
var now = new Date();
var lastyear = now.getYear() + 20;
if(navigator.userAgent.indexOf("MSIE") == -1){
    lastyear = lastyear + 1900;
}
 
//alert(lastyear);
 
var daycell = new Array();
 
function caltoday()
{
 
document.getElementById('calmonth').selectedIndex=now.getMonth();
var cyear = now.getYear();
if(navigator.userAgent.indexOf("MSIE") == -1){
    cyear = cyear + 1900;
}
document.getElementById('calyear').value = cyear;
//alert("1");
updateCalender();
}
 
function refresh()
{
for(i=0;i<42;i++)
 eval(daycell[i]).innerHTML="<font color='white'>' '</font>";
}
 
function updateCalender()
{
 
refresh();
month = document.getElementById('calmonth').selectedIndex;
year  = document.getElementById('calyear').value;
//alert("Year : "+ year+" month:  "+month);
var firstOfMonth = new Date (year, month, 1);
//alert("firstOfMonth : "+ firstOfMonth);
 
var startingPos = firstOfMonth.getDay();
var curday=1;
var days=monthdays(month,year);
 
var comyear = now.getYear();
if(navigator.userAgent.indexOf("MSIE") == -1){
    comyear = comyear + 1900;
}
 
for(cells=0;cells<42;cells++)
  {
    if(curday <= days)
    {
      if(curday == now.getDate() & month==now.getMonth() & year==comyear)
	  {
	    eval(daycell[startingPos]).innerHTML="<font color='red'>"+curday+"</font>";
		startingPos++;
        curday++;
	  }
	  else
	  {
       eval(daycell[startingPos]).innerHTML=curday;
       startingPos++;
       curday++;
     }
    }
  }
}
// Check for Month days
//----------------------
function monthdays(month,year)  {
var days;
if (month==0 || month==2 || month==4 || month==6 || month==7 || month==9 || month==11 || month==-1 || month==12)  days=31;
else if (month==3 || month==5 || month==8 || month==10) days=30;
else if (month==1)  {
if (leapyear(year)) { days=29; }
else { days=28; }
}
return (days);
}
 
// Check for leap year
//---------------------
 
function leapyear (Year)
{
 if (((Year % 4)==0) && ((Year % 100)!=0) || ((Year % 400)==0))
 {
  return (true);
 }
  else
  {
   return (false);
  }
}
 
function goforwardmonth()
{
 month = document.getElementById('calmonth').selectedIndex;
 month++;
 if (month==12)
 {
    month=0;
	document.getElementById('calmonth').selectedIndex=month;
    goforwardyear();
  }
  document.getElementById('calmonth').selectedIndex=month;
  updateCalender();
}
 
function goforwardyear()
{
year = document.getElementById('calyear').value;
year++;
if(year>lastyear)
{
 year=firstyear;
}
 document.getElementById('calyear').value=year;
 updateCalender();
}
 
function gobackwardmonth()
{
 month = document.getElementById('calmonth').selectedIndex;
 month--;
 if (month==-1)
 {
    month=11;
	document.getElementById('calmonth').selectedIndex=month;
    gobackwardyear();
  }
  document.getElementById('calmonth').selectedIndex=month;
 
  updateCalender();
}
 
function gobackwardyear()
{
year = document.getElementById('calyear').value;
year--;
if (year<firstyear)
 {
  year=lastyear-1
 }
document.getElementById('calyear').value=year;
updateCalender();
}
 
var caption="calendar";
calobj="<table border='1' cellspacing='0' cellpadding='0' class='calborder'>";
calobj+="<tr><td>";
calobj+="<table border='0' cellspacing='2' cellpadding='0' class='calender'>";
calobj+="<tr><td><select name='calmonth' id='calmonth' onChange=updateCalender()><option>JAN</option><option>FEB</option><option>MAR</option><option>APR</option>";
calobj+="<option>MAY</option><option>JUN</option><option>JUL</option><option>AUG</option><option>SEP</option><option>OCT</option>";
calobj+="<option>NOV</option><option>DEC</option></select></td>";
calobj+="<td  align='right'><select name='calyear' id='calyear' onChange=updateCalender()>";
 
for(i=firstyear;i<=lastyear;i++)
{
var curyear = now.getYear();
if(navigator.userAgent.indexOf("MSIE") == -1){
    curyear = curyear + 1900;
}
if (i== curyear)
  {
     calobj+='<option selected value="'+i+'">'+i+'</option>';
  	 //calobj+="<option selected value="+i+">"+i+"</option>";
  }
  else
  {
    calobj+='<option value="'+i+'">'+i+'</option>';
	//calobj+="<option value="+i+">"+i+"</option>";
  }
}
//calobj+="<option value=2008>2008</option>";
calobj+="</select></td></tr>";
calobj+="<tr><td colspan='5'>"
calobj+="<table cellspacing='0' style='BORDER-COLLAPSE: collapse' borderColor='#111111' border='1'  width='100%'>";
calobj+="<tr align='center'>";
calobj+="<td class='caldays'>SUN</td><td class='caldays'>MON</td><td class='caldays'>TUE</td><td class='caldays'>WED</td><td class='caldays'>THU</td><td class='caldays'>FRI</td><td class='caldays'>SAT</td>";
calobj+="</tr>";
 
for (cal=0;cal<6;cal++ )
{
calobj+="<tr><td width='14%' class='calwknd' id=cal"+(cal*7)+">&nbsp;</td>"
calobj+="<td width='14%' class='calwkdy' id=cal"+(1+(cal*7))+">&nbsp;</td>"
calobj+="<td width='14%' class='calwkdy' id=cal"+(2+(cal*7))+">&nbsp;</td>"
calobj+="<td width='14%' class='calwkdy' id=cal"+(3+(cal*7))+">&nbsp;</td>"
calobj+="<td width='14%' class='calwkdy' id=cal"+(4+(cal*7))+">&nbsp;</td>"
calobj+="<td width='14%' class='calwkdy' id=cal"+(5+(cal*7))+">&nbsp;</td>"
calobj+="<td width='14%' class='calwknd' id=cal"+(6+(cal*7))+">&nbsp;</td></tr>";
}
calobj+="</table>";
calobj+="</td></tr>";
 
calobj+="<tr><td  colspan='2'><table border='0' width='100%'>";
 
//calobj+="<tr align='center'><td width='20%'><input type=button name='backyear' value='&lt;&lt;' class='calbutts' onClick=gobackwardyear()></td>";
calobj+="<tr align='center'><td width='20%'><a name='backyear' href='javascript:gobackwardyear()' class='calbutts'>&lt;&lt;</a></td>";
 
//calobj+="<td width='20%'><input type='button' name='backmonth' value='&lt'; class='calbutts' onClick=gobackwardmonth()></td>";
calobj+="<td width='20%'><a name='backmonth'  class='calbutts' href='javascript:gobackwardmonth()'>&lt;</a></td>";
 
//calobj+="<td width='20%'><input type='button' name='today' value='TODAY' class='calbutts' onClick=caltoday()></td>";
calobj+="<td width='20%'><a name='today'  class='calbutts' href='javascript:caltoday()'>TODAY</a></td>";
 
//calobj+="<td width='20%'><input type='button' name='forwardyear' value='&gt;' class='calbutts' onClick=goforwardmonth()></td>";
calobj+="<td width='20%'><a name='forwardyear' class='calbutts' href='javascript:goforwardmonth()'>&gt;</a></td>";
 
//calobj+="<td width='20%'><input type='button' name='forwardmonth' value='&gt&gt'  class='calbutts' onClick=goforwardyear()></td></tr>";
calobj+="<td width='20%'><a name='forwardmonth' class='calbutts' href='javascript:goforwardyear()'>&gt;&gt;</a></td></tr>";
 
calobj+="</table></td></tr>";
calobj+="</table>";
calobj+="</td>";
calobj+="</tr>";
calobj+="</table>";
 
for(i=0;i<42;i++)
{
 daycell[i]="cal"+i;
}
 
function getYears(){
  var yearobj="<select name='YYYY' size='1'>";
  yearobj+="<option selected value='0'>YYYY</option>";
  var cnow = new Date();
  var currentyear = cnow.getYear();
  if(navigator.userAgent.indexOf("MSIE") == -1){
    currentyear = currentyear + 1900;
  }
  for(i=1900;i<=currentyear;i++)
  {
     yearobj+='<option value="'+i+'">'+i+'</option>';
  }
  yearobj+="</select>";
  document.write(yearobj);
  }
 
 
function getYourAge()
   {
   var varAsOfDate = new Date();
   var selectedYear = document.agecal.YYYY.options[document.agecal.YYYY.selectedIndex].value;
   var selectedMonth = document.agecal.MM.options[document.agecal.MM.selectedIndex].value;
   var selectedDay = document.agecal.DD.options[document.agecal.DD.selectedIndex].value;
   var hh = document.agecal.HH.options[document.agecal.HH.selectedIndex].value;
   var mm = document.agecal.MN.options[document.agecal.MN.selectedIndex].value;
   var ss = document.agecal.SS.options[document.agecal.SS.selectedIndex].value;
 
   var varBirthDate = new Date(Date.UTC(selectedYear, selectedMonth-1, selectedDay, hh, mm, ss, 00));
 
   var dtAsOfDate;
   var dtBirth;
   var dtAnniversary;
   var intSpan;
   var intYears;
   var intMonths;
   var intWeeks;
   var intDays;
   var intHours;
   var intMinutes;
   var intSeconds;
   var strHowOld ='';
 
   dtBirth = new Date(varBirthDate);
   dtAsOfDate = new Date(varAsOfDate);
 
   if ( dtAsOfDate >= dtBirth )
      {
 
      intSpan = ( dtAsOfDate.getUTCHours() * 3600000 +
                  dtAsOfDate.getUTCMinutes() * 60000 +
                  dtAsOfDate.getUTCSeconds() * 1000    ) -
                ( dtBirth.getUTCHours() * 3600000 +
                  dtBirth.getUTCMinutes() * 60000 +
                  dtBirth.getUTCSeconds() * 1000       )
 
      if ( dtAsOfDate.getUTCDate() > dtBirth.getUTCDate() ||
           ( dtAsOfDate.getUTCDate() == dtBirth.getUTCDate() && intSpan >= 0 ) )
         {
 
         dtAnniversary =
            new Date( Date.UTC( dtAsOfDate.getUTCFullYear(),
                                dtAsOfDate.getUTCMonth(),
                                dtBirth.getUTCDate(),
                                dtBirth.getUTCHours(),
                                dtBirth.getUTCMinutes(),
                                dtBirth.getUTCSeconds() ) );
 
         }
 
      else
         {
 
         dtAnniversary =
            new Date( Date.UTC( dtAsOfDate.getUTCFullYear(),
                                dtAsOfDate.getUTCMonth() - 1,
                                dtBirth.getUTCDate(),
                                dtBirth.getUTCHours(),
                                dtBirth.getUTCMinutes(),
                                dtBirth.getUTCSeconds() ) );
 
		 intMonths = dtAsOfDate.getUTCMonth() - 1;
         if ( intMonths == -1 )
            intMonths = 11;
 
         while ( dtAnniversary.getUTCMonth() != intMonths )
 
             dtAnniversary.setUTCDate( dtAnniversary.getUTCDate() - 1 );
 
         }
 
      if ( dtAnniversary.getUTCMonth() >= dtBirth.getUTCMonth() )
         {
 
         intMonths = dtAnniversary.getUTCMonth() - dtBirth.getUTCMonth();
 
         intYears = dtAnniversary.getUTCFullYear() - dtBirth.getUTCFullYear();
 
         }
 
      else
         {
 
         intMonths = (11 - dtBirth.getUTCMonth()) + dtAnniversary.getUTCMonth() + 1;
 
         intYears = (dtAnniversary.getUTCFullYear() - 1) - dtBirth.getUTCFullYear();
 
         }
 
      intSpan = dtAsOfDate - dtAnniversary;
 
      intWeeks = Math.floor(intSpan / 604800000);
 
      intSpan = intSpan - (intWeeks * 604800000);
 
      intDays = Math.floor(intSpan / 86400000);
 
      intSpan = intSpan - (intDays * 86400000);
 
      intHours = Math.floor(intSpan / 3600000);
 
      intSpan = intSpan - (intHours * 3600000);
 
      intMinutes = Math.floor(intSpan / 60000);
 
      intSpan = intSpan - (intMinutes * 60000);
 
      intSeconds = Math.floor(intSpan / 1000);
 
 
	  if( selectedYear != 0){
		  if ( intYears > 0 )
			 if ( intYears > 1 )
				strHowOld = intYears.toString() + ' Years';
			 else
				strHowOld = intYears.toString() + ' Year';
		  else
			 strHowOld = '';
       }
 
	 if( selectedMonth  != 0){
		  if ( intMonths > 0 )
			 if ( intMonths > 1 )
				strHowOld = strHowOld + ' ' + intMonths.toString() + ' Months';
			 else
				strHowOld = strHowOld + ' ' + intMonths.toString() + ' Month';
     }
 
	if( selectedDay  != 0){
		  if ( intWeeks > 0 )
			 if ( intWeeks > 1 )
				strHowOld = strHowOld + ' ' + intWeeks.toString() + ' Weeks';
			 else
				strHowOld = strHowOld + ' ' + intWeeks.toString() + ' Week';
 
		  if ( intDays > 0 )
			 if ( intDays > 1 )
				strHowOld = strHowOld + ' ' + intDays.toString() + ' Days';
			 else
				strHowOld = strHowOld + ' ' + intDays.toString() + ' Day';
	 }
 
	  if ( hh != 0)  {
		  if ( intHours > 0 )
			 if ( intHours > 1 )
				strHowOld = strHowOld + ' ' + intHours.toString() + ' Hours';
			 else
				strHowOld = strHowOld + ' ' + intHours.toString() + ' Hour';
	  }
 
	  if ( mm != 0)  {
		  if ( intMinutes > 0 )
			 if ( intMinutes > 1 )
				strHowOld = strHowOld + ' ' + intMinutes.toString() + ' Minutes';
			 else
				strHowOld = strHowOld + ' ' + intMinutes.toString() + ' Minute';
      }
 
	  if ( ss != 0)  {
		  if ( intSeconds > 0 )
			 if ( intSeconds > 1 )
				strHowOld = strHowOld + ' ' + intSeconds.toString() + ' Seconds';
			 else
				strHowOld = strHowOld + ' ' + intSeconds.toString() + ' Second';
	  }
 
      }
   else
      strHowOld = 'Not Born Yet';
 
	  document.agecal.age.value = strHowOld;
   }
 
function set(number){
  if (document.calc.T3.value != ''){
   if (document.calc.T3.value != 'sqrt') {
   	document.calc.T4.value = document.calc.T3.value;
   }
   document.calc.T1.value = '';
   document.calc.T3.value = '';
  }
   if (number == '+/-'){
     var current = document.calc.T1.value;
     if(current.charAt(0) == '-'){
     	document.calc.T1.value = current.substring(1,current.length);
     } else {
     	document.calc.T1.value = '-' + document.calc.T1.value ;
	 }
   } else if (number == '.'){
       if (document.calc.T1.value.indexOf('.') == -1){
		   document.calc.T1.value = document.calc.T1.value + number;
       }
   }
   else {
   document.calc.T1.value = document.calc.T1.value + number;
   }
 
   setWords(document.calc.T1.value.length);
}
 
function setWords(digits){
   if(digits == 1) {
	 document.calc.display.value ="Unit";
   } else if(digits == 2) {
	 document.calc.display.value ="Tens";
   } else if(digits == 3) {
	 document.calc.display.value ="Hundred";
   } else if(digits == 4) {
	 document.calc.display.value ="Thousand";
   } else if(digits == 5) {
	 document.calc.display.value ="Ten Thousand";
   } else if(digits == 6) {
	 document.calc.display.value ="Lakh";
   } else if(digits == 7) {
	 document.calc.display.value ="Ten Lakh";
   } else if(digits == 8) {
	 document.calc.display.value ="Crore";
   } else if(digits == 9) {
	 document.calc.display.value ="Ten Crore";
   }
}
 
 
function operation(operand){
 if (document.calc.T4.value != '='){
  evaluates('=');
  document.calc.T4.value='';
 }
 if (document.calc.T1.value != '' && document.calc.T1.value !='.' && document.calc.T1.value != '-'
	&& document.calc.T1.value != '-.'){
 
   if ( operand == 'p%'){
	document.calc.T1.value = eval(document.calc.T1.value)/100;
	operand = '*';
   }
 
   document.calc.T2.value = document.calc.T1.value;
   document.calc.T3.value = operand;
   document.calc.d.value = operand;
 }
}
 
function evaluates(operand){
  if (operand == '=' && document.calc.T4.value !=''){
   document.calc.T3.value = operand;
   var first =  eval(document.calc.T2.value);
   var second = eval(document.calc.T1.value);
   var oper = document.calc.T4.value;
   var sfinal = first;
   sfinal += oper;
   sfinal += second;
   document.calc.T1.value = eval(sfinal);
   document.calc.d.value = '';
   document.calc.T4.value='';
   setWords(document.calc.T1.value.length);
  }
 }
 
 function clr(operand){
  if (operand == 'c'){
     document.calc.T1.value ='';
     document.calc.T2.value ='';
     document.calc.T3.value ='';
     document.calc.T4.value ='';
     document.calc.d.value  ='';
     document.calc.display.value  ='';
   }
 }
 
 function specialOperation(operand){
  if (operand == 'sqrt' && document.calc.T1.value != ''
						&& document.calc.T1.value !='.'
						&& document.calc.T1.value != '-'
						&& document.calc.T1.value != '-.'){
	 document.calc.T3.value = operand;
     var second = eval(document.calc.T1.value);
     document.calc.T1.value =Math.sqrt(second);
   }
    if (operand == 'bksp'){
     var first = document.calc.T1.value;
     document.calc.T1.value = first.substring(0,first.length-1);
   }
   if (operand == '1/x' && document.calc.T1.value != ''
						&& document.calc.T1.value !='.'
						&& document.calc.T1.value != '-'
						&& document.calc.T1.value != '-.'){
     document.calc.T1.value = eval(1/eval(document.calc.T1.value));
   }
 }
 
 function memoryOperation(operand){
 
 	if(operand == 'MS'){
 		document.calc.memory.value = document.calc.T1.value;
 		document.calc.MD.value='M';
 	} else if(operand == 'MR'){
 		document.calc.T1.value = document.calc.memory.value;
 		document.calc.T4.value = document.calc.T3.value;
 		document.calc.T3.value = '';
 		document.calc.MD.value='M';
 	} else if(operand == 'MC'){
 		document.calc.memory.value ='';
 		document.calc.MD.value='';
 	} else if(operand == 'M+' && document.calc.T1.value != ''){
 	    if(document.calc.memory.value == ''){document.calc.memory.value='0';}
   		document.calc.memory.value = eval(document.calc.memory.value) + eval(document.calc.T1.value);
   		document.calc.MD.value='M';
   	}
 }
 
 function checkDigit(){
	var num = document.calc.T1.value;
	if (isNaN(num)){
		document.calc.T1.value = num.substring(0,num.length-1);
	}
}
 
function setEmail(){
document.form1.display.value = document.form1.emails.options[document.form1.emails.selectedIndex].text;
}
function setPhone(){
document.form2.display.value = document.form2.phones.options[document.form2.phones.selectedIndex].text;
}
function setBirthday(){
//document.form3.display.value = document.form3.serial.options[document.form3.serial.selectedIndex].text;
}
 
function setGK(){
document.formGK.display.value = document.formGK.gk.options[document.formGK.gk.selectedIndex].text;
}
 
function setFI(){
document.formFI.display.value = document.formFI.finance.options[document.formFI.finance.selectedIndex].text;
}
 
function setYahoo(){
 document.yahoo.p.value = document.f.q.value;
 document.yahoo.submit();
}
 
function setAltavista(){
 document.altavista.q.value = document.f.q.value;
 document.altavista.submit();
}
 
function setBing(){
 document.bing.q.value = document.csesearchbox.q.value;
 document.bing.submit();
}
 
function setWP(){
document.formWP.display.value = document.formWP.wp.options[document.formWP.wp.selectedIndex].text;
}
function setGK1(){
document.formGK1.display.value = document.formGK1.gk.options[document.formGK1.gk.selectedIndex].text;
}
function setEvent(){
document.formEV.display.value = document.formEV.event.options[document.formEV.event.selectedIndex].text;
}
 
function setnews(){
document.newsarchieve.newsDetails.value = document.newsarchieve.archieve.options[document.newsarchieve.archieve.selectedIndex].text;
}
 
function setMovie(){
var movieValue = document.moviestore.movie.options[document.moviestore.movie.selectedIndex].value;
var firstValue = movieValue.split('@');
var textValue = document.moviestore.movie.options[document.moviestore.movie.selectedIndex].text;
document.moviestore.movieDetails.value = textValue + " - " + firstValue[1];
}
 
function setCode1(){
document.frmsearch1.symbol.value = document.frmsearch1.code.options[document.frmsearch1.code.selectedIndex].value;
document.frmsearch1.details.value = document.frmsearch1.code.options[document.frmsearch1.code.selectedIndex].text;
}
 
var innerText;
var visibility = true;
function HideDiv(obj){
 if(visibility){
	 document.getElementById(obj).style.visibility="hidden";
	 innerText = document.getElementById(obj).innerHTML;
	 document.getElementById(obj).innerHTML = "";
	 visibility = false;
 }
}
 
function ShowDiv(obj){
 if(!visibility){
   document.getElementById(obj).style.visibility="visible";
   document.getElementById(obj).innerHTML = innerText;
    visibility = true;
 }
}
 
 
var tickerText;
var tickerVisibility = true;
function HideTickerDiv(obj){
 if(tickerVisibility){
	 document.getElementById(obj).style.visibility="hidden";
	 tickerText = document.getElementById(obj).innerHTML;
	 document.getElementById(obj).innerHTML = "";
	 tickerVisibility = false;
 }
}
 
function ShowTickerDiv(obj){
 if(!tickerVisibility){
   document.getElementById(obj).style.visibility="visible";
   document.getElementById(obj).innerHTML = tickerText;
    tickerVisibility = true;
 }
}
 
function electionResult(){
window.open("election.html","Election","height=235,width=410,status=0,resizable=0,toolbar=0,menubar=0");
}
 
function watchSerial() {
var  selectedMove = document.form3.serial.options[document.form3.serial.selectedIndex].value;
window.open(selectedMove,"","height=700,width=800,status=1,resizable=1,toolbar=1,menubar=1,scrollbars=1");
}


 
function startMovie() {
var  selectedMovie = document.moviestore.movie.options[document.moviestore.movie.selectedIndex].value;
var firstValue = selectedMovie.split('@');
window.open(firstValue[0],"watchmovie","height=700,width=800,status=1,resizable=1,toolbar=1,menubar=1,scrollbars=1");
}
 
function validate1()
{ testValue = new String();
  tstvale=frmsearch1.symbol.value;
  if (tstvale=="type symbol")
  { alert("Please enter a company code")
	return false; }
  if(tstvale.length==0)
  {	  alert("Enter company code")
	  return false;  }
  if (frmsearch1.selectcat.value=="News")
{window.open('http://content.icicidirect.com/research/topsearchnews.asp?icicicode='+frmsearch1.symbol.value+'&category=corporate','glo11','width=500,height=500,status,scrollbars,resizable')}
  else
	if (frmsearch1.selectcat.value=="Snapshots")
{window.open('http://content.icicidirect.com/research/topsearchcompanysnap.asp?icicicode='+frmsearch1.symbol.value+'&category=corporate','glo22','width=670,height=500,status,scrollbars,resizable')}
   else
	if (frmsearch1.selectcat.value=="Charts")
{window.open('http://content.icicidirect.com/research/chartstop.asp?icicicode='+frmsearch1.symbol.value+'&category=corporate','glo33','width=550,height=500,status,scrollbars,resizable')}
	 else
{
window.open('http://content.icicidirect.com/research/topsearchquotes.asp?icicicode='+frmsearch1.symbol.value+'&category=corporate','glo44','width=500,height=470,status,scrollbars,resizable')
}
}
 
function googleNews(){
window.open("news.html","GoogleNews","height=270,width=320,status=0,resizable=0,toolbar=0,menubar=0");
}
 
function bhajanVideo(){
window.open("bhajan.html","BHAJAN","width=543 height=480, status=0,resizable=0,toolbar=0,menubar=0");
}
 
function yogaVideo(){
window.open("yoga.html","YOGA","width=543 height=480, status=0,resizable=0,toolbar=0,menubar=0");
}
 
function techVideo(){
window.open("Technology.html","YOGA","width=543 height=480, status=0,resizable=0,toolbar=0,menubar=0");
}
 
function nurseryRhymes(){
window.open("NurseryRhymes.html","NurseryRhymes","width=543 height=480, status=0,resizable=0,toolbar=0,menubar=0");
}
function PlayYouTube(){
window.open("YouTube.html","YouTube","width=543 height=515,status=0,resizable=0,toolbar=0,menubar=0");
}
 
function watchTV(){
//alert("You are going to watch Live TV");
window.open("CNBC.HTML","CNBCAWAZ","height=525,width=570,status=0,resizable=0,toolbar=0,menubar=0");
 
}
 
function watchCNBCTV18(){
//alert("You are going to watch Live TV");
window.open("CNBCTV18.HTML","CNBCTV18","height=525,width=570,status=0,resizable=0,toolbar=0,menubar=0");
 
}
 
function openCalc(){
//alert("You are going to watch Live TV");
window.open("http://www.myshortcut.net/CALC.html","UPSCALC","height=330,width=285,status=0,resizable=0,toolbar=0,menubar=0");
}
 
function TechNews(){
window.open("technews.html","TechNews","height=270,width=320,status=0,resizable=0,toolbar=0,menubar=0");
}

function openSite() {
var  op = document.formGK.gk.options[document.formGK.gk.selectedIndex].value;
if (op != ""){
  window.open(op,"","height=700,width=800,status=1,resizable=1,toolbar=1,menubar=1,scrollbars=1");
}
}

function moremovies(){
window.open("movie.html","moremovie","height=270,width=600,status=0,resizable=0,toolbar=0,menubar=0");
}
 
function HideFeatures(){
  //HideDiv('taxguru');
  //HideConversionDiv('conversion');
}
 
 
function addbookmark1()
{
    //alert(document.location.toString());
	bookmarkurl= "http://mshortcuts.googlepages.com/MyShortcut.html";
	bookmarktitle="My Shortcuts - Makes our life easy"
	if (document.all)
	{
		window.external.AddFavorite(bookmarkurl,bookmarktitle)
	}
}
 
function addbookmark(){
	bookmarkurl= "http://www.myshortcut.net";
	bookmarktitle="My Shortcuts - Makes our life easy"
	if(window.external)window.external.AddFavorite(bookmarkurl,bookmarktitle);
	else if(window.sidebar)window.sidebar.addPanel(bookmarktitle,bookmarkurl,"");
}
 

function gi(obj) {
var url = document.getElementById(obj).value;
	//alert(googleLocal);
	if (url =="m"){
		window.open("googleLocal.html","GoogleLocal","height=290,width=290,status=0,resizable=0,toolbar=0,menubar=0");
		document.getElementById(obj).value = "";
	}
	else if (url != ""){
		//alert(url);
        document.df.action = url;
        document.df.submit();
		document.getElementById(obj).value = "";
	} 
}

function openwindow(obj) {
var url = document.getElementById(obj).value;
window.open(url,"","height=700,width=800,status=1,resizable=1,toolbar=1,menubar=1,scrollbars=1");
document.getElementById(obj).value = "";
}
 
function getHoroscope(){
var sign = document.horoscope.sign.options[document.horoscope.sign.selectedIndex].value;
var url = "http://www.rrtearoom.com/horoscope/"+sign;
window.open(url,"","width=620,height=380,resizable=yes,scrollbars=yes,location=no");
}
 
function calculateTax(){
 
var netIncome = document.tax.netTaxIncome.value;
var taxPay = eval((0.1*40000)+(0.2*100000)+(0.3*(netIncome-250000)));
document.tax.totalTax.value = taxPay;
document.tax.taxPayable.value = eval(document.tax.educess.value) + taxPay;
}
 
 
function compareText (option1, option2) {
  return option1.text < option2.text ? -1 :
    option1.text > option2.text ? 1 : 0;
}
function compareValue (option1, option2) {
  return option1.value < option2.value ? -1 :
    option1.value > option2.value ? 1 : 0;
}
function compareTextAsFloat (option1, option2) {
  var value1 = parseFloat(option1.text);
  var value2 = parseFloat(option2.text);
  return value1 < value2 ? -1 :
    value1 > value2 ? 1 : 0;
}
function compareValueAsFloat (option1, option2) {
  var value1 = parseFloat(option1.value);
  var value2 = parseFloat(option2.value);
  return value1 < value2 ? -1 :
    value1 > value2 ? 1 : 0;
}
function sortSelect (select, compareFunction) {
  if (!compareFunction)
    compareFunction = compareText;
  var options = new Array (select.options.length);
  for (var i = 0; i < options.length; i++)
    options[i] = 
      new Option (
        select.options[i].text,
        select.options[i].value,
        select.options[i].defaultSelected,
        select.options[i].selected
      );
  options.sort(compareFunction);
  select.options.length = 0;
  for (var i = 0; i < options.length; i++)
    select.options[i] = options[i];
}
 
function rbi(f){if (navigator.appName == "Netscape") {f.biw.value=self.innerWidth;} else {f.biw.value=document.body.clientWidth;}}
 

