﻿document.onmousemove = mouse;
var ie, ie4, ns4, ns6;
var text;
ie = document.all;
ns4 = document.layers;
ns6 = document.getElementById && !document.all;

function mouse(e)
{
	if(ns4 || ns6)
	{
	x = e.pageX;
	}
	if(ie)
	{
	x = document.body.scrollLeft+event.clientX;
	}
}

function addFeed()
{
	pozx = x-300;
	printaddbox();		
	if(ns6 || ie)
	{
		document.getElementById('addboxarea').style.left = pozx+'px';
		document.getElementById('addboxarea').style.top = (45)+'px';
		document.getElementById('addboxarea').style.visibility = 'visible';
	}
}


function closeaddbox()
{
if(ns6 || ie) document.getElementById('addboxarea').style.visibility = 'hidden';
}

function printaddbox()
{
text  = '<form action="http://youbookmarks.com/settings/index.php" method="GET">';
text += '<div style="overflow:auto;"><table border="0" cellpadding="0" cellspacing="0" style="overflow:auto; width: 300px; border: 0px;">';
text += '<tr class="addtop">';
text += '<td style="padding-left: 10px; padding-right:10px;">';
text += '<a href="javascript:closeaddbox();">';
text += '<img style="float: right;" src="../images/close.gif" title="'+form_add_1+'" alt="'+form_add_1+'"/>';
text += '</a>';
text += form_add_2+'</td></tr>';
text += '<tr class="addmid">';
text += '<td style="padding-left: 10px;"><div id="addarea">'+form_add_3+'<br/>';
text += '<input type="hidden" name="id" style="width: 270px;" value="add" >';
text += '<input type="text" name="url" style="width: 270px;" value=""><br/><br/>';
text += '<input type="hidden" name="public" value="1">';
text += '<input class="submit" type="submit" name="submit" value="'+form_add_5+'">';
text += '</div></td></tr>';
text += '<tr class="addbot"><td style="padding-left: 10px;"></td></tr></table></div></form>';
document.getElementById("addboxarea").innerHTML = text;
}
