function menu(obj){
	if(document.getElementById){
	var el1 = document.getElementById(obj);
	var ar1 = document.getElementById("masterdiv").getElementsByTagName("div"); 
		
			for (var i=0; i<ar1.length; i++){
				if(ar1[i].className == "opentab") {
					ar1[i].className = "offtab";
				}
			}
		document.getElementById(obj).className = "opentab";
	}
}





function readCookie(name) {

var cookiename = 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(cookiename) == 0) return unescape(c.substring(cookiename.length,c.length));

}

return null;
}

var post = readCookie('stocks');

if(post)
{
	post = post.replace(/\+/g," ");
	if(post!=0)
	{
	document.write("<DIV CLASS=\"wlcome\">Welcome:  <B>"+post+"  &nbsp;|</B>  &nbsp;<A HREF=\"http://test.diwalimela.com/dshop/logoff.php\">Log Out</A></DIV>");
	
	}
	else
	{
	}
}


function run()
        {
		ow=screen.width;
		if (ow == 800)
        {
        document.getElementById('body_bg').className="body800";
			if (document.getElementById('txt_pro'))
			{
				document.getElementById('txt_pro').className="txth";
				document.getElementById('txt_pro').style.width="1";
			}
		}

		if (ow == 1024)
        {
        document.getElementById('body_bg').className="body1024";
        }

		if (ow == 1280)
        {
        document.getElementById('body_bg').className="body1280";
		}
		 if (ow >= 1281)
                {
                   document.getElementById('body_bg').className="all";
                }
		}
