

// These varibles will be used to store the position of the mouse
var X = -100
var Y = -100

// This is the function that will set the position in the above varibles 
function getPosition(args) 
{
	if( document.captureEvents && Event.MOUSEMOVE ) 
	{
		document.captureEvents(Event.MOUSEMOVE)
	}

// On the move of the mouse, it will call the function getPosition
//document.onmousemove = getPosition;
  // Gets IE browser position
  if (document.all) 
  {
    X = event.clientX + document.body.scrollLeft
    Y = event.clientY + document.body.scrollTop
  }
  
  // Gets position for other browsers
  else 
  {  
    X = args.pageX
    Y = args.pageY
  }  
}
function backgroundFilter()
{
    try{
    var div;
    var div1;
    
 
    	div = document.getElementById('backgroundFilter'); 
 
    
   /*if(top.frames['ChunkListFrame'].document.getElementById)
    	div1 = top.frames['ChunkListFrame'].document.getElementById('backgroundFilter'); 
    else if(top.frames['ChunkListFrame'].document.all) 
   	 // Get the element in old IE's 
   	 div1 = top.frames['ChunkListFrame'].document.all['backgroundFilter']; 
   */ 
//alert('0000'+div);
//alert(' 111 '+document);

    // if the style.display value is blank we try to check it out here 
    if(div.style.display==''&& div.offsetWidth!=undefined && div.offsetHeight!=undefined)
    {
        div.style.display = (div.offsetWidth!=0 && div.offsetHeight!=0)?'block':'none'; 
     //   div1.style.display = (div1.offsetWidth!=0 && div1.offsetHeight!=0)?'block':'none'; 
    }
    
    // If the background is hidden ('none') then it will display it ('block').
    // If the background is displayed ('block') then it will hide it ('none').
    div.style.display = (div.style.display==''||div.style.display=='block')?'none':'block';
     //div1.style.display = (div1.style.display==''||div1.style.display=='block')?'none':'block';
    }catch(e)
    {
    	alert(e);
    }
}

function popUp()
{
    var div;
    
   backgroundFilter();
    // Standard way to get element
    div = document.getElementById('dvDialogContent'); 
	 if(document.all) 
    // Get the element in old IE's 
    div = document.all['dvDialogContent']; 
    //alert(div);
    // if the style.display value is blank we try to check it out here 
    if(div.style.display==''&& div.offsetWidth!=undefined && div.offsetHeight!=undefined)
    {
        div.style.display = (div.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none'; 
    }
    
    // If the PopUp is hidden ('none') then it will display it ('block').
    // If the PopUp is displayed ('block') then it will hide it ('none').
    div.style.display = (div.style.display==''||div.style.display=='block')?'none':'block';
   
}


function BookmarkDelicious(u,d,t,n) {

	var thisURL = 'http://del.icio.us/post?v=3&noui=yes&jump=close&url=' + escape(u) + '&title=' + escape(d) + '&notes=' + escape(n);
	window.open(thisURL, 'delicious','toolbar=no,width=700,height=260,resizable=yes');
	outbound('delicious', thisURL);
}


function outbound(sType, sURL) {
	var xmlOutbound = CreateXMLHTTP();
	if (!xmlOutbound) {
		return;
	}
	
	xmlOutbound.open('GET', '/xml_action.aspx?action=outbound&type=' + sType + '&url=' + sURL, true);
	xmlOutbound.send(null);
}

function CreateXMLHTTP() {
	var oXMLHTTP = false;
    if(window.XMLHttpRequest) {
    	try {
			oXMLHTTP = new XMLHttpRequest();
        } catch(e) {
			oXMLHTTP = false;
        }
    } else if(window.ActiveXObject) {
       	try {
        	oXMLHTTP = new ActiveXObject('Msxml2.XMLHTTP');
      	} catch(e) {
        	try {
          		oXMLHTTP = new ActiveXObject('Microsoft.XMLHTTP');
        	} catch(e) {
          		oXMLHTTP = false;
        	}
		}
    }
    return oXMLHTTP;
}
