Financial/Tax Planning with good Retuns

Recently I were discussing with my financial/Insurance advisor regarding this Year’s tax planning. I asked him for a plan that it would help me in
1. tax savings
2. and also it should be an investment which should return more returns at me age of 53.
3. And if anything happens to me my Dependants (wife and kids), won;t be affected and they have to be taken care of with sufficient money for their future.

I’ve opted for 50 Lacs coverage.

There are two plans he suggested.

One Plan is from Birla sun life.
For 50 Lacs
* you have to invest 5000Rs per month else yearly 60000
* you have the option that you can pay 2000 one month if you have less money and if you have more you can pay more. the thing is you should have paid 60000 at the end of the year
* it covers normal death benifits, accidental and even covers major diseases (11 diseases are listed)
* you can get the tax benifits under 80C
* The min lock in period is 4 Yrs. The total investment yrs you have do is 10 yrs. so at the end of 10 yrs you have paid Rs 6Lacs
* Since this is Market linked Policy, With a 10 % projected growth, you would get 23 Lacs(approx).

Another from LIC (Jeevan Tarang)
* you have to pay Rs800+ (age 33) Per Lac for a month.
* at the end of 10 yrs you would get sum assured and the bonus, loyalty addition
* then every year you get Rs 5,500 until your age of 100.
* after our life, our nominee will get another sum assured (say 1 Lac)
* you can get the tax benifits under 80C

after going thru the Jeevan Tarang i decided Like this

In this plan what I would like to suggest is
take a policy for 1 Lac per Month till the next coming 12 Months. so the next April 2008 you would have took 12 policies (apr 2007 -08)
first year (apr 07- apr 08) you will be paying
Rs 800, (1 Policy)
Rs 1600 (for 2 policies)
Rs 2400 (3)

from the next year you have to pay for 12 policies / month up to 10 Years.
After Apr 2017 (10 yrs)
you will get 10 Lacs with bonus + addition
and 5,500 per Month until your age of 100
your nominee will get another sum assured Rs. 10 Lac.
Sounds really good.??? this is better than any other pension policy which won’t yield this much returns

Let me know your thoughts

A Simple Tooltip with Images and Text

As a web programmer we need to show tool tip often in our pages but not in an old fashioned way. Something appealing and subtle to the page layout design.

Mostly we go for available open source scripts which are free. I were also doing the same until I decided to write a simple one when I were in need of customizing a free snippet, which took more time.

Writing a tool tip is quite simple

This is a a simple Tooltip for you web pages with minimal code. Images , Text and HTML code can be shown inside the tooltip

Download the source code Here

Get Available Width and Height excluding your toolbars

Often we come across problems with the available screen area with different screen resolutions. The major problem is with the toolbars, somebody having the default toolbars of the browsers, and some buddy will have more toolbars installed, like Google , Y! etc. And even some users will have the taskbar twice the height of the default height for showing the quick launch bar, custom toolbars in the task bar, more tray icons.

The Problem is to find the available screen space excluding the toolbars in different resolutions. Here is a simple way of doing this.
First we find the resolution and then the available real estate/space for showing our stuff. The following function will do that.

 function init(){
var screenH = screen.height;
    var screenW = screen.width;
    alert("Your Screen Resolution:n" + screenW + "px x " + screenH + "px");
        availW = document.body.clientWidth;
        availH = document.body.clientHeight;
        availW = innerWidth; availH = innerHeight;
    alert("Available Space exculing the Toolbars:n" + availW + "px + x " + availH + "px"); } 

WordPress 2.0.7 Released

WordPress 2.0.7 has been released. The major focus of this release was a new security patch under certain versions of PHP with register_globals turned on, plus a fix in Conditional GET support under certain combinations of IIS/PHPCGI versions (AKA the “Feedburner bug”). There are a few other minor bugfixes in there, as well.

You can download the new version here

Resizing the Firefox Search Bar

To make the search bar longer, we need to add a couple of CSS rules to a file named userChrome.css.
This file is located in your profile directory. It can be located at
c:/documents and settings/logged in username/Application Data/Mozilla/firefox/Profiles/

If it is hard to find the profile you can install the the Chrome Edit Extension from

After installing the extension, restart Firefox.

Next, click on the Tools menu and choose Edit User Files.
You will be shown a new window that has five tabs on it. These tabs represent all of the user
files that you can modify to customize the Firefox browser. The first tab will be named userChrome.css
this is the file that we want to modify.

Else open it in your text editor and look for the following lines

#search-container, #searchbar {
width: 200px !important;  /* < ----- change this pixels as you like. 400px is more than enough. 200 sits quite in the layout and make readable */

Save the file, in ur texteditor or by clicking the Save button at the bottom of the Chrome Edit window
and restart Firefox.

Now you will notice that your search bar size is changed.

Thats it.

Printing from a popup window

Recently one of my buddy tried to use window.print from a popup window
he were working on in webpage. And everytime he called window.print, it
doesn’t worked and the pop window went blank. He asked me to sort this out.

I tried out with this below technique and it worked.
Actually, window.print doesn’t work in a child window which is opened using the method
we have to use it as

function printChildWindow() {
var newWindow ="yourhtmlhere.html", "newWindow", "height=200,width=300");
The window.print command stalls because the new window is still open
for input. If it is closed with windowName. document. close ; then the print
command will work as expected.

Read data from a CSV file in PHP

// open the text file
$fd = fopen ("pilots.csv", "r");
// initialize a loop to go through each line of the file
while (!feof ($fd)) {
$buffer = fgetcsv($fd, 4096); // declare an array to hold all of the contents of each
//row, indexed
echo "n";
// this for loop to traverse thru the data cols
// when this is re-created with MySQL use the mysql_num_fileds() function to get
// this number
for ($i = 0; $i < 5; ++$i){
if ($buffer[$i] == ""){
$buffer[$i] = " ";
// print 's with each index
echo "$buffer[$i]n";
echo "n";
fclose ($fd);

Draggable Divs

Add dragging to your div elements. just adding class=”drag” to the div element will make it draggable.

Here i’m adding an example for a draggable dialog box

font-family: Verdana,Arial,Sans-serif,'Times New Roman';
font-size: 9pt;
font-weight: normal;
font-style: normal;
color: #666;
text-decoration: none;

font-family: Verdana,Arial,Sans-serif,’Times New Roman’;
font-size: 9pt;
font-weight: bold;
font-style: normal;
color: #ffffff;
text-decoration: none;
background: #ECF1F9;
border: 1px #a1bcdf solid;
</style><script language=”javascript”>
//browser detection
var agt=navigator.userAgent.toLowerCase();
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);

var is_nav = ((agt.indexOf(‘mozilla’)!=-1) && (agt.indexOf(‘spoofer’)==-1)
&& (agt.indexOf(‘compatible’) == -1) && (agt.indexOf(‘opera’)==-1)
&& (agt.indexOf(‘webtv’)==-1) && (agt.indexOf(‘hotjava’)==-1));
var is_nav4 = (is_nav && (is_major == 4));
var is_nav6 = (is_nav && (is_major == 5));
var is_nav6up = (is_nav && (is_major >= 5));
var is_ie = ((agt.indexOf(“msie”) != -1) && (agt.indexOf(“opera”) == -1));

var dragapproved=false
var z,x,y
var maxleft,maxtop,maxright,maxbottom;

function setdragBounds(){
//you can set the bounds of the draggable area here
maxleft = 10;
maxtop = 10;
maxright = document.body.clientWidth – 10;
maxbottom = document.body.clientHeight – 100;

function move(e){
var tmpXpos = (!is_ie)? temp1+e.clientX-x: temp1+event.clientX-x;
var tmpYpos = (!is_ie)? temp2+e.clientY-y : temp2+event.clientY-y;
if (dragapproved){ = tmpXpos; = tmpYpos;

if(tmpXpos < maxleft) = maxleft;
if(tmpXpos > maxright) = maxright;

if(tmpYpos < maxtop) = maxtop;
if(tmpYpos > maxbottom) = maxbottom;
return false

function drags(e){
if (!(is_ie)&&!(!is_ie))
var firedobj=(!is_ie)? : event.srcElement
var topelement=(!is_ie)? “HTML” : “BODY”

while (firedobj.tagName!=topelement && firedobj.className!=”drag” && firedobj.tagName!=’SELECT’ && firedobj.tagName!=’TEXTAREA’ && firedobj.tagName!=’INPUT’ && firedobj.tagName!=’IMG’){
//here you can add the elements that cannot be used for drag . using their class name or id or tag names
firedobj=(!is_ie)? firedobj.parentNode : firedobj.parentElement

if (firedobj.className==”drag”){
var tmpheight =“px”)
maxbottom = (tmpheight[0])?document.body.clientHeight – tmpheight[0]:document.body.clientHeight – 20;

x=(!is_ie)? e.clientX: event.clientX
y=(!is_ie)? e.clientY: event.clientY
return false
document.onmouseup=new Function(“dragapproved=false”)


<div id=”Dialog” style=”width:316px;height:119px;max-width:316px;position:absolute;top:50px;left:140px; z-index:1000;” class=”drag”>
<table width=”100%” style=”width:315px;height:119px” cellspacing=”0″ cellpadding=”0″ class=”alertsBox” id=”dialog_table”>
<tr style=”cursor:move”>
<td class=”alertsBoxTitle notselectable” colspan=”2″ align=”left” height=”21″ style=”cursor:move;background-color:#32426F”>Drag Me</td>
<td align=”center” colspan=”2″ height=”5″> </td>
<td align=”center” colspan=”2″>
<table width=”97%” border=”0″ cellspacing=”0″ cellpadding=”0″ align=”center”>
<td valign=’top’ align=”center”>
<td valign=’top’ colspan=”2″ class=”Text”>You can place text here</td>
<td valign=’top’ colspan=”2″ align=”center”><br/><input type=”button” value=”Ok”/></td>

you can set the area in which the div(s) can be dragged using setdragBounds function