var w;
if(ob)
{
document.write("<object classid=clsid:DD25E7F5-89E3-4225-8EB8-69D6A4AF2242 id=MP ");
document.write("height=0 width=0></object>");
}

function getAddress(form, flag, rownum)
{
var check;
var count;
count = 0;
check = IsInstalled();
if(check==true)
{
document.MP.showbook();
count = parseInt(document.MP.count);
if(flag==1)
{
	var obj = eval("document.ecard.receiver_email["+rownum+"]");
}
else if(flag==0)
{	
	var obj = eval("document.ecard.receiver_email");

}

	for(var i=0;i<count;i++)
	{
		
		if(i==0 && obj.value=="")
		{
		obj.value=document.MP.getadd(i);
		}
		else
		{
		obj.value=obj.value + "," + document.MP.getadd(i);
		}
	}

}
else
{
w = window.open("","subwindow","height=350,width=500");
w.document.write("<html><head><title>Kamna.com:Kamna Address Book</title></head>");
w.document.write("<p><font face=Arial size=4 color=#000066><center>Installing Kamna Address Book Component</font></p>");
w.document.write("<hr></center><font face=arial size=2><p><b>KAB is a small Application certified from verisign,USA.</b> <br></p>");
w.document.write("<p>How do I Install KAB ? <br></p>");
w.document.write("Easy Steps:<br><br>");
w.document.write("1. Click the </font><font face=arial size=2 color=\"#ff0000\">'Yes'</font><font face=arial size=2> button on Security Warning Window.<br>");
w.document.write("2. Please wait till a small window pop's up, which indicate that<br>");
w.document.write("&nbsp;&nbsp;&nbsp;   Component is successfully Installed.<br>");
w.document.write("3. Click </font><font face=arial size=2 color=\"#ff0000\">'Get Outlook Express Addresses'</font><font face=arial size=2> button to add addresses from Outlook <br>&nbsp;&nbsp;&nbsp;&nbsp;Express.<br><br>");
w.document.write("<center><img src=http://www.epatra.com/images/strip.gif></img>");
w.document.write("<object classid=clsid:DD25E7F5-89E3-4225-8EB8-69D6A4AF2242 id=MP ");
w.document.write("codebase=http://www.epatra.com/cabs/epatra.cab#Version=1,0,0,0 height=0 width=0></object>");
window.setTimeout("",10000);

window.setInterval("CheckInstall()",500);
}

}


function CheckInstall()
{
	if(w.document.MP.p)
	{
	alert("Component Sucessfully Installed");
	window.location.reload(true);
        w.close();
	}

}

function IsInstalled()
{
	if(ob)
	{
	return true;
	}
	else
	{
	return false;
	}
}
