function addSelectOption(selectObj, text, value, isSelected, index) 
{
    if (selectObj != null && selectObj.options != null)
    {
//        selectObj.options[index] = new Option(text, value, false, isSelected);
        selectObj.options[index] = new Option(text, value, isSelected, isSelected);
    }
};

function removeSelectOption(theSel)
{
//  var selIndex = theSel.selectedIndex;
  var selIndex = theSel.length;

//alert("length is: " + selIndex);
  if (selIndex != -1) {
    for(i=theSel.length-1; i>=0; i--)
    {
//      if(theSel.options[i].selected)
//      {
//alert("removing: " + i);
        theSel.options[i] = null;
//      }
    }
    if (theSel.length > 0) {
      theSel.selectedIndex = selIndex == 0 ? 0 : selIndex - 1;
    }
  }
};

// This function is not used as of now.
// It is here for testing purposes

function incr(tid, did, price)
{
    var tx = document.getElementById(tid);
    
    var val = tx.value;
    val++;
    tx.value = val;
    
//    var dx = document.getElementById(did);
    
//    val = val * price;
    
//    dx.innerHTML = val;
    
};

function decr(tid, did, price)
{
    var tx = document.getElementById(tid);
    
    var val = tx.value;
    
    if (val == 1)
    {
        return;
    }
    val--;
    tx.value = val;

//    var dx = document.getElementById(did);
    
//    val = val * price;
    
//    dx.innerHTML = val;
};

function CreateTable(wd, ht, srcTag, ctx)
{
        var srcTable = document.createElement("table");
	if(IsValidNumber(wd) && IsValidNumber(ht) && (srcTag != null))
	{
	        var srcHolder = document.getElementById(srcTag);
		srcHolder.appendChild(srcTable);
                srcTable.id = ctx;
                srcTable.align = "center";
                srcTable.className = 'tadd';
		srcTable.border = 0;
		//srcTable.borderColor = "Black";
	}
	
	return srcTable.id;
};

function AppendRow(t, ix)
{

        var srcTable = document.getElementById(t);
        var row;
//        alert('added table3' + srcTable);
	if(srcTable != null)
	{
		row = srcTable.insertRow(ix);
//		row.align = "left";
		return row;
	}
	else
	{
		alert("ROW: Error while creating table. Cause: Container Table is null!");
	}
};

function AppendCell(srcRow, ix)
{
//        alert('added table4' + srcRow);
        var cell;
	if(srcRow != null)
	{
		cell = srcRow.insertCell(ix);
//		cell.font.size = "4px";
		return cell;
	}
	else
	{
		alert("CELL: Error while creating table. Cause: Container row is null!");
	}
};

function IsValidNumber(ipNum)
{
	if(isNaN(ipNum))
	{
		alert("Invalid Number!");
		return false;
	}
	else if(ipNum < 1)
	{
		alert("Number should be greater than 0!");
		return false;
	}
	else
	{
	return true;
	}
};

function printChildWindow(r, o, p, m)
{
//    dom.disable_window_open_feature.location = false;
    var ogs = document.getElementById("ogs").value;
    //ogs = "ogs/ogs-test";
    
//    alert("the pcw ogs is: " + ogs + ", rdc is: " + r);

    var url = "http://www.greenytails.com/cgi-bin/" + ogs + "/orderdisplay.cgi?regdevcode=" + r + "&orderid=" + o + "&merchant=" + m;
    
    popupShow('divpop', url);
    
//    var wp  = "width=500,height=600,left=200,top=50,location=no,scrollbars=yes,resizable=no,toolbar=no,status=no,menubar=no,";

//alert('wp: ' + wp);

//    self.c = window.open(url, "", wp);

//    if (p != 0)
//    {
//        setTimeout('self.c.print()',3000);
//    }
    return false;
};

/* this function shows the pop-up when
user moves the mouse over the link */
function Show(e, id, a, b)
{
//    document.getElementById('popt1').innerHTML = a;
//    document.getElementById('popt2').innerHTML = "<img src=\"" + b + "\" />";


//alert('inovke2-a: ' + a + ', invoke2-b: ' + b);
    var posx = 0;
    var posy = 0;
    if (!e) var e = window.event;
    
    if (e.pageX || e.pageY)
    {
	posx = e.pageX;
	posy = e.pageY;
    }
    else if (e.clientX || e.clientY)
    {
	posx = e.clientX + document.body.scrollLeft
		+ document.documentElement.scrollLeft;
	posy = e.clientY + document.body.scrollTop
		+ document.documentElement.scrollTop;
    }
    
    var Popup = document.getElementById('Popup');

    x = posx + 20;
    y = posy + 20;

    /* display the pop-up */
    Popup.style.display="inline";

    Popup.innerHTML = "<div id=\"popt1\" style=\"background-color: #003366\"><b>" + a + "</b></div><div id=\"popt2\"><img src=\"" + b + "\" /></div>";

//ajaxGetProducts(id);


    /* set the pop-up's left */
    Popup.style.left = x;

    /* set the pop-up's top */
    Popup.style.top = y;
//alert('inovke2-x: ' + x + ', invoke2-y: ' + y);
};

/* this function hides the pop-up when
user moves the mouse out of the link */
function Hide()
{
    var Popup = document.getElementById('Popup');
    /* hide the pop-up */
    Popup.style.display="none";
};

function openChildWindow(page)
{
//    dom.disable_window_open_feature.location = false;
    var url = page;
    
    var wp  = "width=500,height=600,left=200,top=50,location=no,scrollbars=yes,resizable=no,toolbar=no,status=no,menubar=no,";

//alert('wp: ' + wp);

    self.c = window.open(url, "", wp);

//    setTimeout('self.c.print()',3000);
    return false;
};

function dateTime()
{
    var d = document.getElementById('DT');
    
    var dt = getCalendarDate(0) + ', ' + getClockTime();

//var dtobj = new Date();
//dt = dtobj.toLocaleString();

//    d.innerHTML = "<table><tr><td align=\"left\"><input type=\"text\" name=\"s\" class=\"tf2\" size=\"15\" value=\"" + dt + "\" /></td></tr></table>";
//    d.innerHTML = "<font size=\"0.5px\">" + dt + "</font>";
    d.innerHTML = dt;
    
    setTimeout("dateTime()",  1000);
};

function centerDiv2Text(full)
{
    var cd2 = document.getElementById('CENTERDIV2');
    var str1, str2, str3, str4;

    str1 = "<img src=\"images/what_is_greenytails.jpg.jpg\" width=\"182\" height=\"32\" style=\"padding-left:15px;\" /><br><font color=\"black\"><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GreenyTails is an unique \"Online Retail Enabler Platform\". GreenyTails is first of its kind to bring multiple retailers at one junction, allowing customers to place their orders online for their favorite retail outlet(s).</p><br><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GreenyTails is an online business enabler for store owners and individuals who aspire to start and own an online business store of products like: </font><b><font color=\"maroon\" size=\"3\">groceries, vegetables, fruits, cakes, flowers</font></b> etc.</p>";
    
    str2 = '';
    str3 = '';
    
    str4 = '';
    
    if (full == 1)
    {
        str2 = "<br><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Shopping at GreenyTails is no different than shopping directly at the retail outlet. It allows customers to browse the shopping catalog very similar to that of isle shopping, simple to navigate across product categories and select products, add them to cart or remove from cart at very ease.</p><br><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GreenyTails is a pure web2.0 portal bringing the best technologies together in order to provide customers with ease-of-use and fast internet shopping experience.</p><br><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GreenyTails also brings similar advantages of shopping discounts directly from retail outlets and provides many other amazing benefits. Apart from regular shopping discounts provided by the retail outlets, GreenyTails gives rewardpoints on each order you place. Please check <a href=\"#\" onclick=\"otherPages('availspecialdiscounts', 25);return false;\"><font color=\"blue\">discounts and rewards</font></a> section for more details.</p><br><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;We strive towards making GreenyTails, the best online grocery and daily needs shopping portal on the net. If you have any feedback, please let us know. We appreciate any kind of <a href=\"#\" onclick=\"otherPages(null, 4);becomePartner(0);return false;\"><font color=\"blue\">feedback</font></a>.</p><br><p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If you did not find your favorite store or city or area you live then please <a href=\"#\" onclick=\"otherPages(null, 4);becomePartner(0);return false;\"><font color=\"blue\">let us know</font></a> and we make every effort to reach out with our service.</p></font>";
        
        str3 = "<div style=\"text-align:right;\"><a href=\"#\" align=\"right\" onclick=\"otherPages(null, 11);centerDiv2Text(0);return false;\"><b><font color=\"blue\"><< Back</font></b></a></div><br><br>";
    }
    else
    {
        str3 = "<div style=\"text-align:right;\"><a href=\"#\" align=\"right\" onclick=\"otherPages(null, 11);centerDiv2Text(1);return false;\"><b><font color=\"blue\">>> More Details</font></b></a></div><br>";
        
        var tmp = homepageAds();
        tmp = "<img src=\"images/adds_moving.jpg\" width=\"413\" height=\"92\" />";
//        alert ("tmp is: " + tmp);
        str3 = str3 + tmp;
    }
    
    cd2.innerHTML = "<div style=\"text-align:left;font-family: Arial,Helvetica,sans-serif;font-size:13px;\">" +
                     str1 + str2 +
                    "</div>" + str3 + str4;
};

function homepageAds()
{
    var str;
    
    str = "<div ID=\"HOMEPAGEADS\" style=\"font-weight:bold;\">" +
            "<table width=\"440\" height=\"320\" border=\"0\">" +
              "<tr>" +
                "<td width=\"210\" height=\"100\"><a href=\"http://www.getthebest.com\" target=\"_blank\"><img src=\"getthebest.gif\" width=\"180\" height=\"58\" style=\"padding:5px 0px 0px 0px;\" alt=\"getthebest\"/></a><br>Hyderabad's First Online Vegetables/Fruits Store</td>" +
                "<td width=\"210\" height=\"100\"><a href=\"http://www.homeshop18.com\" target=\"_blank\"><img src=\"homeshop18.gif\" width=\"180\" height=\"55\"/></a><br>India's TV and Internet Shopping Store</td>" +
              "</tr>" +
              "<tr>" +
                "<td width=\"210\" height=\"100\"><a href=\"http://www.fnp.in\" target=\"_blank\"><img src=\"fnp.gif\" width=\"180\" height=\"55\"/></a><br>A Leading Flower Delivery Portal</td>" +
                "<td width=\"210\" height=\"100\"><a href=\"http://www.indiaplaza.in\" target=\"_blank\"><img src=\"indiaplaza.gif\" width=\"180\" height=\"55\"/></a><br>Online Books, Music, Electronics and Gift Items</td>" +
              "</tr>" +
              "<tr>" +
                "<td width=\"210\" height=\"100\"><a href=\"http://shopping.yahoo.com\" target=\"_blank\"><img src=\"yahoo.gif\" width=\"180\" height=\"55\"/></a><br>Yahoo Shopping</td>" +
                "<td width=\"210\" height=\"100\"><a href=\"http://shopping.rediff.com\" target=\"_blank\"><img src=\"rediff.gif\" width=\"180\" height=\"55\"/></a><br>Rediff Shopping<br></td>" +
              "</tr>" +
              "<tr>" +
                "<td width=\"210\"></td>" +
                "<td width=\"210\" align=\"right\" style=\"font-size:7pt\">To Place Your Ad Click: <a href=\"#\" onclick=\"otherPages(null, 9);becomePartner(0);return false;\">Contact Us</a></td>" +
              "</tr>" +
            "</table>" +
          "</div><br><br>";
    
    return str;
};

function ogsFaq()
{
    var cd2 = document.getElementById('CENTERDIV2');

    var a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12;
    
    a1 = 1; a2 = 2; a3 = 3; a4 = 4; a5 = 5; a6 = 6;
    a7 = 7; a8 = 8; a9 = 9; a10 = 10; a11 = 11; a12 = 12;

    cd2.style.align = "left";
    cd2.innerHTML = "<div style=\"text-align:left;padding:20px 20px;\"><font color=\"maroon\">1.  <a href=\"#\" onclick=\"ogsFaqWindow(" + a1 + "); return false;\">How can I contact GreenyTails.com?</a><br>" +
"2.  <a href=\"#\" onclick=\"ogsFaqWindow(" + a2 + "); return false;\">How do I place an order?</a><br>" +
"3.  <a href=\"#\" onclick=\"ogsFaqWindow(" + a3 + "); return false;\">How do I make payments?</a><br>" +
"4.  <a href=\"#\" onclick=\"ogsFaqWindow(" + a4 + "); return false;\">How is the order delivered?</a><br>" +
"5.  <a href=\"#\" onclick=\"ogsFaqWindow(" + a5 + "); return false;\">What if there has been a change in the recipient's address?</a><br>" +
"6.  <a href=\"#\" onclick=\"ogsFaqWindow(" + a6 + "); return false;\">Are the items delivered as per the display on the webpage?</a><br>" +
"7.  <a href=\"#\" onclick=\"ogsFaqWindow(" + a7 + "); return false;\">How can I confirm that the item has been delivered on-time?</a><br>" +
"8.  <a href=\"#\" onclick=\"ogsFaqWindow(" + a8 + "); return false;\">Should I register with GreenyTails.com?</a><br>" +
"9.  <a href=\"#\" onclick=\"ogsFaqWindow(" + a9 + "); return false;\">Area there any Shipping/Delivery charges involved?</a><br>" +
"10. <a href=\"#\" onclick=\"ogsFaqWindow(" + a10 + "); return false;\">What if I have to cancel my order?</a><br>" +
"11. <a href=\"#\" onclick=\"ogsFaqWindow(" + a11 + "); return false;\">What if the ordered item is out of stock or not available for shipping?</a><br>" +
"12. <a href=\"#\" onclick=\"ogsFaqWindow(" + a12 + "); return false;\">What about the Privacy of my information?</a></font><br><br><div style=\"text-align:left;\" id=\"FAQ\"></div></div>";
    
};

function ogsFaqWindow(i)
{
    var ans = new Array(12);
    
    ans[0] = "There will be no answer to this question :D";
    
    ans[1] = "<br>" +
"<br>" +
"1.  <b><font color=\"maroon\">How can I contact GreenyTails.com?</font></b><br>" +
"You can reach us at egrocerymart@sarinapps.com. We will<br>" +
"soon provide a telephone support soon as we build our team<br>" +
"bigger.<br>";

    ans[2] = "<br>" +
"2.  <b><font color=\"maroon\">How do I place an order?</font></b><br>" +
"GreenyTails is designed to be self intuitive. But for<br>" +
"more clarity, we made a complete page to guide you with<br>" +
"step-by-step procedure to place order. Please click on<br>" +
"<a href=\"#\" onclick=\"otherPages('howto', 5);return false;\">How-To</a> link on the menu bar.<br><div>&nbsp;</div>";

    ans[3] = "<br>" +
"3.  <b><font color=\"maroon\">How do I make payments?</font></b><br>" +
"Our first release supports only Cash-On-Delivery.<br>" +
"We are evaluating various payment gateway options best<br>" +
"suited. More about cash-on-delivery, check <a href=\"#\" onclick=\"otherPages('onlycashondelivery', 26);return false;\">COD</a><br><div>&nbsp;</div>";

    ans[4] = "<br>" +
"4.  <b><font color=\"maroon\">How is the order delivered?</font></b><br>" +
"The order will be packed as per the procedure of the store<br>" +
"you selected and delivered at your door.<br>";

    ans[5] = "<br>" +
"5.  <b><font color=\"maroon\">What if there has been a change in the<br>" +
"recipient's address?</font></b><br>" +
"You must inform us of this change at least 1 day before<br>" +
"the date of delivery or your order may be delivered to<br>" +
"the wrong address for which we will not be held<br>" +
"responsible.<br>";

    ans[6] = "<br>" +
"6.  <b><font color=\"maroon\">Are the items delivered as per the display<br>" +
"on the webpage?</font></b><br>" +
"The products will match the image on the webpage as the<br>" +
"images have been sourced from the vendors from whom the<br>" +
"final order is going to be sourced. But GreenyTails,<br>" +
"reserves in its absolute discretion, to deliver a similar/<br>" +
"alternate product for reasons beyond its control. But we<br>" +
"make every effort to keep our details on our site up to so<br>" +
"you can match the product displayed on our site and the<br>" +
"product displayed.<br>";

    ans[7] = "<br>" +
"7.  <b><font color=\"maroon\">How can I confirm that the item has been<br>" +
"delivered on-time?</font></b><br>" +
"You can verify or track your order status using<br>" +
"<a href=\"#\" onclick=\"otherPages(null, 3);history();return false;\">Track Your Order</a> link<br><div>&nbsp;</div>";

    ans[8] = "<br>" +
"8.  <b><font color=\"maroon\">Should I register with GreenyTails.com?</font></b><br>" +
"It is recommended to register with GreenyTails and you<br>" +
"must use mobile number with out which you cannot place<br>" +
"an order. You can also get automatically registered<br>" +
"while placing the order.<br>";

    ans[9] = "<br>" +
"9.  <b><font color=\"maroon\">Area there any Shipping/Delivery charges<br>" +
"involved?</font></b><br>" +
"We do not charge for Shipping/Delivery.<br>";

    ans[10] = "<br>" +
"10. <b><font color=\"maroon\">What if I have to cancel my order?</font></b><br>" +
"An order can be cancelled at least a day before the<br>" +
"delivery scheduled date or before the order is changed<br>" +
"from 'New Order' status.<br>";

    ans[11] = "<br>" +
"11. <b><font color=\"maroon\">What if the ordered item is out of stock<br>" +
"or not available for shipping?</font></b><br>" +
"In case if an ordered item is not available for shipping<br>" +
"or if it is out of stock, the store you selected would<br>" +
"inform by a call on the registered mobile number.<br>";

    ans[12] = "<br>" +
"12. <b><font color=\"maroon\">What about the Privacy of my information?</font></b><br>" +
"We consider the privacy of our customers very important.<br>" +
"We are in the business of serving you, not selling your<br>" +
"information. Your name, address information, are collected<br>" +
"only to fulfill your order. We will occasionally send<br>" +
"email to our customers notifying them of special<br>" +
"promotions or significant changes to our web site.<br>";

    var fd = document.getElementById('FAQ');
    
    fd.innerHTML = ans[i];
};

function becomePartner(p)
{
    var tmpRow, tmpCell1, tmpCell2;
    
    loadStoreDivs(0);

    if (p == 1)
    {
        document.getElementById('CENTERDIV3').innerHTML = "<br><font size=\"4\" color=\"black\"><b>Become Partner</b></font><br><br>";
        document.getElementById('CENTERDIV4').innerHTML = "<br><font><b>PLEASE FILL UP THE FOLLOWING FORM TO PARTNER WITH US</b></font><br><br>";
    }
    else
    {
        document.getElementById('CENTERDIV3').innerHTML = "<br><font size=\"4\" color=\"black\"><b>Contact Us</b></font><br><br>";
        document.getElementById('CENTERDIV4').innerHTML = "<br><font><b>PLEASE FILL UP THE FOLLOWING FORM TO CONTACT US</b></font><br><br>";
    }

    var cd = document.getElementById('CENTERDIV2');
    cd.innerHTML = "";
    
    var d1  = document.createElement("div");
    d1.id   = "T2RESP1";
    d1.innerHTML = "";

    cd.appendChild(d1);

    var d3  = document.createElement("div");
    d3.id   = "BP";
//    d3.style.border = "2px solid black";

    cd.appendChild(d3);

    var ct  = CreateTable('425','450','BP', 'BPTABLE');

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_1";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "*Your Name:";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<input type=\"text\" name=\"pname\" id=\"pname\" size=\"25\" maxlength=\"25\" />";

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_2";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "Company Name:";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<input type=\"text\" name=\"pcori\" id=\"pcori\" size=\"25\" maxlength=\"25\" />";

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_1";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "*Address Line1:";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.innerHTML = "<input type=\"text\" name=\"paddr1\" id=\"paddr1\" size=\"50\" maxlength=\"50\" />";

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_2";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "Address Line2:";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.innerHTML = "<input type=\"text\" name=\"paddr2\" id=\"paddr2\" size=\"50\" maxlength=\"50\" />";

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_1";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "*City:";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<input type=\"text\" name=\"pcity\" id=\"pcity\" size=\"25\" maxlength=\"25\" />";

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_2";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "Pincode:";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<input type=\"text\" name=\"pcode\" id=\"pcode\" size=\"25\" maxlength=\"25\" />";

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_1";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "*10digit Mobile No:";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<input type=\"text\" name=\"pcont\" id=\"pcont\" size=\"25\" maxlength=\"25\" />";

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_2";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "*Email ID";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<input type=\"text\" name=\"pemail\" id=\"pemail\" size=\"25\" maxlength=\"25\" />";

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_1";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "Message:";

    var bname;
    
    if (p == 1)
    {
        bname = "partner_me.jpg";
    }
    else
    {
        bname = "contact_us.jpg";
    }
    
    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<textarea name=\"pmesg\" id=\"pmesg\" rows=\"6\" cols=\"38\" onKeyPress=\"return taLimit(this, 300);\" onKeyUp=\"return taCount(this,'pmesgcnt', 300, '" + bname + "');\" ></textarea><br><B><SPAN id=pmesgcnt>300</SPAN></B> characters remaining for message</font>";

    tmpRow = AppendRow('BPTABLE', '-1');

    tmpCell1 = AppendCell(tmpRow, '0');
    
    tmpCell1.innerHTML = "";
    
    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<br><a href=\"#\" onclick=\"ajaxPartner();return false;\" ><img src=\"images/" + bname + "\"  name=\"partner\"id=\"partner\" value=\"" + bname + "\" /></a><br>";
    
    var pp  = document.createElement("div");
    
    if (p == 1)
    {
        br = "* fields are mandatory<br><br><br><br><br><br><br>";
    }
    else
    {
        br = "* fields are mandatory<br><br><font size=\"1px\" color=\"maroon\"><b>Address1:  29-3-20, Venkateswara Rao St, GovernorPet, Vijayawada 520002, Andhra Pradesh, India<br>Address2: 1, 2nd floor, 7th cross, 27th main, HSR Layout, sector -1, Bangalore 560102, Karnataka India</b></font><br><br>";
    }
    //pp.innerHTML   = br + "<font size=\"1\">Please go through <a href=\"#\" onclick=\"popupShow('divpop', 'privacy.html');return false;\">privacy policy</a> and <a href=\"#\" onclick=\"popupShow('divpop', 'privacy.html');return false;\">disclaimer</a>.</font>";
    
    cd.appendChild(pp);
};

function taLimitText(taObj, maxL) {
//	if (taObj.value.length>maxL)
//	{
//	    taObj.value = taObj.value.substr(0, maxL);
//	    return false;
//	}
//	return true;
};

function taLimit(taObj, maxL) {
	if (taObj.value.length>=maxL)
	{
//	    alert('max char limit reached');
//	    return false;
            
	}
	return true;
};

function taCount(taObj,Cnt,maxL, bname) { 
    var btn = document.getElementById('partner');
var bName = navigator.appName;
	objCnt=createObject(Cnt);
	objVal=taObj.value;

	if (objCnt) {
//	alert ('objval length: ' + objVal.length);
		if(bName == "Netscape"){	
			objCnt.textContent=maxL-objVal.length;}
		else{objCnt.innerText= '' + parseInt(maxL)-objVal.length;}
	}

	if (objVal.length>maxL)
	{
	    objVal=objVal.substring(0,maxL);
	    if (btn)
	    {
                btn.disabled = true;
                btn.value = "Disabled!";
            }
	}
	else
	{
	    if (btn)
	    {
                btn.disabled = false;
                btn.value = bname;
            }
	}
	return true;
};

function createObject(objId) {
	if (document.getElementById) return document.getElementById(objId);
	else if (document.layers) return eval("document." + objId);
	else if (document.all) return eval("document.all." + objId);
	else return eval("document." + objId);
};

/*Example message arrays for the two demo scrollers*/

var pausecontent=new Array();
pausecontent[0]='The only platform where I can choose a known grocery store of my choice.<br><font color=\"black\">- Sairam</font><br>';
pausecontent[1]='GreenyTails brings down the costs for users as well as retail outlets.<br><font color=\"black\">- Kalyan</font><br>';
pausecontent[2]='A convenient way to place grocery order for my parents in Bangalore. Thanks.<br><font color=\"black\">- Swarna</font><br>';
pausecontent[3]='GreenyTails is most anticipated portal. Glad to see it happen.<br><font color=\"black\">- Mallik</font><br>';

var pausecontent2=new Array();
pausecontent2[0]='<font color=\"black\">SHOPPING RACE BEGINS</font>';
pausecontent2[1]='<font color=\"maroon\">SHOPPING RACE BEGINS</font>';
pausecontent2[2]='<font color=\"green\">SHOPPING RACE BEGINS</font>';
pausecontent2[3]='<font color=\"blue\">SHOPPING RACE BEGINS</font>';

function pausescroller(content, divId, divClass, delay){
 //message array content
 this.content=content;
 //ID of ticker div to display information
 this.tickerid=divId;
 //Delay between msg change, in miliseconds.
 this.delay=delay;
 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
 this.mouseoverBol=0;
 //index of message array for hidden div
 this.hiddendivpointer=1;
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>');
var scrollerinstance=this;

if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false);
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()});
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500);
};

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid);
this.visiblediv=document.getElementById(this.tickerid+"1");
this.hiddendiv=document.getElementById(this.tickerid+"2");
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv));
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px";
this.getinline(this.visiblediv, this.hiddendiv);
this.hiddendiv.style.visibility="visible";
var scrollerinstance=this;

document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1};
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0};
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null});
setTimeout(function(){scrollerinstance.animateup()}, this.delay);
};


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this;
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+5)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-5+"px";
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-5+"px";
setTimeout(function(){scrollerinstance.animateup()}, 250);
}
else{
this.getinline(this.hiddendiv, this.visiblediv);
this.swapdivs();
setTimeout(function(){scrollerinstance.setmessage()}, this.delay);
}
};

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv;
this.visiblediv=this.hiddendiv;
this.hiddendiv=tempcontainer;
};

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px";
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px";
};

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this;
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 200);
else{
var i=this.hiddendivpointer;
var ceiling=this.content.length;
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1;
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer];
this.animateup();
}
};

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"];
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top");
else
return 0;
};



/* this function shows the pop-up when
user moves the mouse over the link */
function popupShow(divid, link)
{
    var dp = document.getElementById(divid);

    x = 120;
    y = 60;

//    dp.style.left = x;

    /* set the pop-up's top */
//    dp.style.top = y;

    /* display the pop-up */
    dp.style.display="inline";

//dp.id = "divpop";
      dp.innerHTML = "<a href=\"#\" onclick=\"javascript:popupHide('divpop');return false;\"><b>CLOSE</b></a>&nbsp;&nbsp;&nbsp;<a href=\"#\" onclick=\"javascript:popupHide('divpop');return false;\"><b><font size=\"3\" color=\"black\">X</font></b></a><iframe id=\"if1\" name=\"if1\" src=\"" + link + "\" width=\"750\" height=\"480\" scrolling=\"auto\" frameborder=\"0\" style=\"background-color:#336600;\"></iframe>";

//dp.innerHTML = "test popup<br><a href=\"#\" onclick=\"popupHide(" + divid + "); return false;\"><font size=\"5\">X</font></a><br><br>";

    /* set the pop-up's left */
//alert('inovke2-x: ' + x + ', invoke2-y: ' + y);
};

/* this function hides the pop-up when
user moves the mouse out of the link */
function popupHide(divid)
{
    var dp = document.getElementById(divid);
    /* hide the pop-up */
    dp.style.display="none";
};

function askToLogin()
{
    document.getElementById("CENTERDIV2").innerHTML = "<div id=\"needlogin\"><b>You need to be logged to perform this operation</b><br><br>" +
                                  "<div class=\"style12\" id=\"SIGNUPX\">" +
                                  "  Hi, New User? <a href=\"#\" onclick=\"addTable1(1);addTable2(1);addFooter(1);return false;\"><b><font color=\"blue\">Sign-Up</font></b></a></div>" +
                                  "<div id=\"SIGNINX\" class=\"style13\" align=\"left\" >" +
                                  "<a href=\"#\" align=\"left\" onclick=\"addTableSignin(1);addFooter(1);return false;\"><font color=\"blue\">Sign-In</font></b></a>" +
                                  "<span>&nbsp;Using Your GreenyTails Account</span>" +

                                  "<span>OR</span><br>" +

                                  "<a href=\"#\" align=\"left\" onclick=\"window.open('gtails_openid.html', '', 'width=500,height=600,left=200,top=50,location=no,scrollbars=yes,resizable=no,toolbar=no,status=no,menubar=no,');return false;\"><font color=\"blue\">Sign-In</font></b></a>" +
                                  "<span>Using Your Google/Yahoo/Facebook/Twitter/AOL/Blogger Account&nbsp;</span></div>";
};

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+";"+expires+"; path=/";
};

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
};

function eraseCookie(name) {
	createCookie(name,null,-1);
};
function createjscssfile(filename, filetype){
 if (filetype=="js"){ //if filename is a external JavaScript file
  var fileref=document.createElement('script');
//  fileref.setAttribute("type","text/javascript");
//  fileref.setAttribute("id", "dynjs");
//  fileref.setAttribute("src", filename);
//  fileref.setAttribute("value", filename);
  fileref.type   = "text/javascript";
  fileref.id     = "dynjs";
  fileref.src    = filename;
  fileref.value  = filename;
 }
 else if (filetype=="css"){ //if filename is an external CSS file
  var fileref=document.createElement("link");
  fileref.setAttribute("rel", "stylesheet");
  fileref.setAttribute("type", "text/css");
  fileref.setAttribute("href", filename);
 }
 return fileref;
};

function replacejscssfile(oldfilename, newfilename, filetype){
 //determine element type to create nodelist using
 var targetelement=(filetype=="js")? "script" : (filetype=="css")? "link" : "none";
 //determine corresponding attribute to test for
 var targetattr=(filetype=="js")? "src" : (filetype=="css")? "href" : "none";
 var allsuspects=document.getElementsByTagName(targetelement);
 for (var i=allsuspects.length; i>=0; i--){ //search backwards within nodelist for matching elements to remove
  if (allsuspects[i] && allsuspects[i].getAttribute(targetattr)!=null && allsuspects[i].getAttribute(targetattr).indexOf(oldfilename)!=-1){
   var newelement=createjscssfile(newfilename, filetype);
   allsuspects[i].parentNode.replaceChild(newelement, allsuspects[i]);
  }
 }
 
 return newelement.src;
};

//replacejscssfile("oldscript.js", "newscript.js", "js"); //Replace all occurences of "oldscript.js" with "newscript.js"
//replacejscssfile("oldstyle.css", "newstyle", "css"); //Replace all occurences "oldstyle.css" with "newstyle.css"

var max=0;
function textlist()
{
    max=textlist.arguments.length; for (i=0; i<max; i++) this[i]=textlist.arguments[i];
};

var tl=new textlist("Are you looking for online grocery business?", "Do you like to find online customers as well?", "GreenyTails is the platform for your needs.");

var x=0;
var pos=0;
var l=tl[0].length;

function textticker()
{
    document.getElementById('tickfield').value=tl[x].substring(0,pos)+"_";
    if(pos++==l)
    {
        pos=0;
        setTimeout("textticker()",1000);
        x++;
        if(x==max)
        {
            x=0;
        }

        l=tl[x].length;
    }
    else
    {
        setTimeout("textticker()",50);
    }

};

function escapeSpecialChars(str)
{
    str = str.replace(/\\/g, "\\\\");
    str = str.replace(/'/g, "\\'");
    
    return str;
};

function merchantDemo()
{
    document.getElementById('CENTERDIV3').innerHTML = '';
    document.getElementById('CENTERDIV4').innerHTML = '';
    
    var cd = document.getElementById('CENTERDIV2');
    cd.innerHTML = "<br><br><br><br><img src=\"images/uc.jpg\"><br><br><br><br>";
};

function customerDemo()
{
    document.getElementById('CENTERDIV3').innerHTML = '';
    document.getElementById('CENTERDIV4').innerHTML = '';

    var cd = document.getElementById('CENTERDIV2');
    cd.innerHTML = "<br><br><br><br><img src=\"images/uc.jpg\"><br><br><br><br>";
};

function writeTestimonial()
{
    var tmpRow, tmpCell1, tmpCell2;
    
    document.getElementById('CENTERDIV4').innerHTML = "<br><font><b>WRITE US A TESTIMONAIL</b></font><br><br>";

    var cd = document.getElementById('CENTERDIV2');
    cd.innerHTML = "";
    
    var d1  = document.createElement("div");
    d1.id   = "T2RESP1";
    d1.innerHTML = "";

    cd.appendChild(d1);

    var d3  = document.createElement("div");
    d3.id   = "BP";
//    d3.style.border = "2px solid black";

    cd.appendChild(d3);

    var ct  = CreateTable('425','450','BP', 'BPTABLE');

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_1";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "*Your Name:";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<input type=\"text\" name=\"pname\" id=\"pname\" size=\"25\" maxlength=\"25\" />";

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_2";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "*Country:";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<input type=\"text\" name=\"pcountry\" id=\"pcountry\" size=\"25\" maxlength=\"25\" />";

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_1";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "*City:";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<input type=\"text\" name=\"pcity\" id=\"pcity\" size=\"25\" maxlength=\"25\" />";

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_2";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "*10digit Mobile No:";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<input type=\"text\" name=\"pcont\" id=\"pcont\" size=\"25\" maxlength=\"25\" />";

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_1";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "*Email ID";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<input type=\"text\" name=\"pemail\" id=\"pemail\" size=\"25\" maxlength=\"25\" />";

    tmpRow = AppendRow('BPTABLE', '-1');
    tmpRow.className = "style7_2";
    
    tmpCell1 = AppendCell(tmpRow, '0');
    tmpCell1.align = "left";
    tmpCell1.innerHTML = "*Testimonial:";

    var bname;
    
    bname = "submit.jpg";

    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<textarea name=\"pmesg\" id=\"pmesg\" rows=\"4\" cols=\"38\" onKeyPress=\"return taLimit(this, 200);\" onKeyUp=\"return taCount(this,'pmesgcnt', 200, '" + bname + "');\" ></textarea><br><B><SPAN id=pmesgcnt>200</SPAN></B> characters remaining for message</font>";

    tmpRow = AppendRow('BPTABLE', '-1');

    tmpCell1 = AppendCell(tmpRow, '0');
    
    tmpCell1.innerHTML = "";
    
    tmpCell2 = AppendCell(tmpRow, '1');
    tmpCell2.align = "left";
    tmpCell2.innerHTML = "<br><a href=\"#\" onclick=\"ajaxTestimonial();return false;\" ><img src=\"images/" + bname + "\"  name=\"partner\"id=\"partner\" value=\"" + bname + "\" /></a><br>";
    
    var pp  = document.createElement("div");
    
    br = "* fields are mandatory<br><br>NOTE: Your mobile number and email are not displayed or shared or sold<br><br><br><br>";

    //pp.innerHTML = br;
    
    pp.innerHTML   = br + "<font size=\"1\">Please go through <a href=\"#\" onclick=\"popupShow('divpop', 'privacy.html');return false;\">privacy policy</a> and <a href=\"#\" onclick=\"popupShow('divpop', 'privacy.html');return false;\">disclaimer</a>.</font>";
    
    cd.appendChild(pp);
};

function allAboutGreenLet()
{
    var cd = document.getElementById('CENTERDIV2');
    

    cd.innerHTML = "<div style=\"text-align:left;padding-left:15px;\">" + 
"<b>What is GreenLet?</b><br>" +
"A GreenLet is a virtual store hosted with GreenyTails and utilize the power of online retailing commerce platform of GreenyTails." +
"<br><br>" +
"" +
"<b>Who can request for a GreenLet?</b><br>" +
"A store merchant or an individual can be a GreenLet" +
"<br><br>" +
"" +
"<b>How to request for a GreenLet?</b><br>" +
"Fill up the <a href=\"#\" onclick=\"becomePartner(1);return false;\">PARTNER</a> form and we will get in touch with you" +
"<br><br>" +
"" +
"<b>What should I provide to host a GreenLet?</b><br>" +
"We host your inventory with us with easy to use utlities. You can manage your GreenLet inventory on your own or GreenyTails team can help you" +
"<br><br>" +
"" +
"<b>How much does it cost to host a GreenLet?</b><br>" +
"There will be a nominal annual registration fee. We have special discounts on annual registration fee if you sign-up for multiple stores. Also ask for the free trial period. Up on sign-up, you will receive merchant login to manage your GreenLet." +
"<br><br>" +
"" +
"<b>How long does it take to activate the GreenLet?</b><br>" +
"Depending on the size of the inventory, it can be done in a day\'s time or sometimes it can take up to a week." +
"<br><br>" +
"" +
"<b>How will I receive the orders placed by customers on my GreenLet?</b><br>" +
"You will receive a real-time SMS alert with the order-id and also receive a real-time email with complete order details. You can also view orders placed for your GreenLet by using your merchant login on GreenyTails site." +
"<br><br>" +
"" +
"<b>What are my minimum requirements once GreenLet is activiated?</b><br>" +
"You need a computer connected to internet. You may need a printer if you want to print the orders placed for your GreenLet." +
"<br><br>" +
"" +
"<b>How to contact if I need more help</b><br>" +
"Use <a href=\"#\" onclick=\"becomePartner(0);return false;\">CONTACT US</a> form and provide complete details about your query." +
"<br>" +
"</div>";

};

function quickLinks()
{
    loadStoreDivs();
    
    var rd = document.getElementById('RIGHTDIV1');
//    alert('here1');
    
    rd.innerHTML = "<div style=\"float:center;width:210px; background:url(images/right_cliparrt.jpg) no-repeat;\">" +
                      "<div id=\"shop_cart\">" +
                        "<table width=\"100%\" border=\"0\" align=\"right\" cellpadding=\"0\" cellspacing=\"0\">" +
                          "<tr>" +
                            "<td width=\"10\" height=\"191\">&nbsp;</td>" +
                              "<td width=\"200\">&nbsp;</td>" +
                               "<td width=\"30\" valign=\"top\"></td>" +
                          "</tr>" +
                          "<tr>" +
                            "<td>&nbsp;</td>" +
                              "<td style=\"padding-left:15px !important;\"><span class=\"style19\">Quick Links</span></td>" +
                              "<td>&nbsp;</td>" +
                          "</tr>" +
                          "<tr>" +
                            "<td height=\"162\">&nbsp;</td>" +
                              "<td id=\"quicklinks\" style=\"padding-left:15px !important;\"><div id=\"RIGHTDIVABC2\">" +
                                "<table cellpadding=\"0\" cellspacing=\"0\" class=\"style13\">" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\"><span class=\"style25\"><a href=\"http://www.greenytails.com/#\" onclick=\"otherPages(null, 33);allAboutGreenLet();quickLinks();return false;\">Want to start a GreenLet?</a> </span></td>" +
                                  "</tr>" +
                                  "<tr> </tr>" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\"><span class=\"style25\"> <a href=\"#\" onclick=\"otherPages('innews', 31);quickLinks();return false;\">In News</a> </span></td>" +
                                  "</tr>" +
                                  "<tr> </tr>" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\"><span class=\"style25\"> <a href=\"http://www.greenytails.com/#\" onclick=\"otherPages('null', 8);ogsFaq();quickLinks();return false;\">Need help? (FAQ)</a> </span></td>" +
                                  "</tr>" +
                                 "<tr> </tr>" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\"><span class=\"style25\"> <a href=\"http://www.greenytails.com/#\" onclick=\"otherPages(null, 3);history(1);quickLinks();return false;\">Track Your Order</a> </span></td>" +
                                  "</tr>" +
                                  "<tr> </tr>" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\"><span class=\"style25\"> <a href=\"http://www.greenytails.com/#\" onclick=\"otherPages('testimonials', 32);quickLinks(); return false;\">View Testimonials</a> </span></td>" +
                                  "</tr>" +
                                  "<tr> </tr>" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\"><span class=\"style25\"> <a href=\"http://www.greenytails.com/#\" onclick=\"otherPages('null', 8);writeTestimonial();quickLinks();return false;\">Write a Testimonial</a> </span></td>" +
                                  "</tr>" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\">&nbsp;</td>" + 
                                  "</tr>" +
                                  "<tr> </tr>" +
                                "</table>" +
                              "</div></td>" +
                          "</tr>" +
                        "</table></div></div>";
};

function nodepUI()
{
   var nd = document.getElementById('NODEP');
   
   nd.innerHTML= "" + 
        "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" +
          "<tr>" +
            "<td width=\"18%\" valign=\"top\">" +
              "<div align=\"center\"><span style=\"padding-left:75px;\"><a href=\"http://www.getthebest.com\" target=\"_blank\"><img src=\"images/logo1.jpg\" width=\"100\" alt=\"\" /></a></span><br>" +
                 "<span style=\"padding-left:75px;\"><a href=\"http://www.homeshop18.com\" target=\"_blank\"><img src=\"images/logo2.jpg\" width=\"100\" alt=\"\" /></a></span><br>" +
                 "<span style=\"padding-left:75px;\"><a href=\"http://www.fnp.in\" target=\"_blank\"><img src=\"images/logo3.jpg\" width=\"100\" alt=\"\" /></a></span><br>" +
                 "<span style=\"padding-left:75px;\"><a href=\"http://www.indiaplaza.in\" target=\"_blank\"><img src=\"images/logo4.jpg\" width=\"100\" alt=\"\" /></a></span><br>" +
                 "<span style=\"padding-left:75px;\"><a href=\"http://shopping.rediff.com\" target=\"_blank\"><img src=\"images/logo5.jpg\" width=\"100\" alt=\"\" /></a></span><br>" +
                 "<span style=\"padding-left:75px;\"><a href=\"http://shopping.yahoo.com\" target=\"_blank\"><img src=\"images/logo6.jpg\" width=\"100\" alt=\"\" /></a></span><br>" +
                 "<span style=\"padding-left:75px;\"><a href=\"http://www.futurebazaar.com\" target=\"_blank\"><img src=\"images/logo7.jpg\" width=\"100\" alt=\"\" /></a></span>" +
            "</div></td>" +
            "<td width=\"62%\" valign=\"top\"><div align=\"left\" style=\"padding:20px;\">" +
              "<div style=\"padding-left:10px;\" id=\"CENTERDIV2\"><div>" +
              "<p><img src=\"images/what_is_greenytails.jpg.jpg\" width=\"182\" height=\"32\" /></p>" +
              "<p>&nbsp;</p>" +
                "<p>GreenyTails is an unique \"Online Retail Enabler Platform\". GreenyTails is first of its kind to bring multiple retailers at one junction, allowing customers to place their orders online for their favorite retail outlet(s). </p>" +
                "<p>&nbsp;</p>" +
                "<p>GreenyTails is an online business enabler for store owners and individuals who aspire to start and own an online business store of products like: groceries, vegetables, fruits, cakes, flowers etc." +
              "<p>&nbsp;<br><br></p>" +
              "<p align=\"center\"><img src=\"images/adds_moving.jpg\" width=\"413\" height=\"92\" /></p>" +
            "</div></div></td>" +
            "<td width=\"20%\" valign=\"top\">" +
              "<div align=\"\" style=\"width:210px; background:url(images/right_cliparrt.jpg) no-repeat;\">" +
                      "<div id=\"shop_cart\">" +
                        "<table width=\"100%\" border=\"0\" align=\"right\" cellpadding=\"0\" cellspacing=\"0\">" +
                          "<tr>" +
                            "<td width=\"10\" height=\"191\">&nbsp;</td>" +
                              "<td width=\"200\">&nbsp;</td>" +
                               "<td width=\"30\" valign=\"top\"></td>" +
                          "</tr>" +
                          "<tr>" +
                            "<td>&nbsp;</td>" +
                              "<td style=\"padding-left:15px !important;\"><span class=\"style19\">Quick Links</span></td>" +
                              "<td>&nbsp;</td>" +
                          "</tr>" +
                          "<tr>" +
                            "<td height=\"162\">&nbsp;</td>" +
                              "<td id=\"quicklinks\" style=\"padding-left:15px !important;\"><div id=\"RIGHTDIV2\">" +
                                "<table cellpadding=\"0\" cellspacing=\"0\" class=\"style13\">" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\"><span class=\"style25\"><a href=\"#\" onclick=\"otherPages(null, 33);allAboutGreenLet();return false;\">Want to start a GreenLet?</a> </span></td>" +
                                  "</tr>" +
                                  "<tr> </tr>" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\"><span class=\"style25\"> <a href=\"#\" onclick=\"otherPages('innews', 31);return false;\">In News</a> </span></td>" +
                                  "</tr>" +
                                  "<tr> </tr>" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\"><span class=\"style25\"> <a href=\"http://www.greenytails.com/#\" onclick=\"otherPages('null', 8);ogsFaq();return false;\">Need help? (FAQ)</a> </span></td>" +
                                  "</tr>" +
                                 "<tr> </tr>" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\"><span class=\"style25\"> <a href=\"http://www.greenytails.com/#\" onclick=\"otherPages(null, 3);history(1);return false;\">Track Your Order</a> </span></td>" +
                                  "</tr>" +
                                  "<tr> </tr>" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\"><span class=\"style25\"> <a href=\"http://www.greenytails.com/#\" onclick=\"otherPages('testimonials', 32); return false;\">View Testimonials</a> </span></td>" +
                                  "</tr>" +
                                  "<tr> </tr>" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\"><span class=\"style25\"> <a href=\"http://www.greenytails.com/#\" onclick=\"otherPages('null', 8);writeTestimonial();return false;\">Write a Testimonial</a> </span></td>" +
                                  "</tr>" +
                                  "<tr>" +
                                    "<td height=\"20\" align=\"left\">&nbsp;</td>" + 
                                  "</tr>" +
                                  "<tr> </tr>" +
                                "</table>" +
                              "</div></td>" +
                          "</tr>" +
                        "</table>" +
                        "</div>" +
              "</div>" +
            "</td>" +
          "</tr>"  +
        "</table>";

};