function hover(id) {
document.getElementById('vinyl_'+id).className = 'vinyl v'+id+' vcur';
}

function unhover(id) {
document.getElementById('vinyl_'+id).className = 'vinyl v'+id;
}

function loadpipeline(id) {
limit = Math.floor((document.body.clientWidth-460)/160);
if (document.getElementById("jhandler")) loadXMLDoc('../scripts/smartgalery.php',id,limit);
}

function loadXMLDoc(url,id,limit) {
    if (window.XMLHttpRequest) 
	{
        req = new XMLHttpRequest();
        req.onreadystatechange = processReqChange;
        req.open("POST", url, true);
		req.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
        req.send("id="+id+"&limit="+limit);
    } 
	else if (window.ActiveXObject) 
	{
        req = new ActiveXObject("Microsoft.XMLHTTP");
        if (req) 
		{
            req.onreadystatechange = processReqChange;
            req.open("POST", url, true);
			req.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
            req.send("id="+id+"&limit="+limit);
        }
    }
}

function processReqChange() 
{   
    if (req.readyState == 4 && req.status == 200) 
	{
		document.getElementById("jhandler").innerHTML = req.responseText;
		initLytebox();
    }  
}
