function showimprimer(url)
{
	window.open(url,"","toolbar=yes, location=yes, directories=yes, status=yes, menubar=yes, scrollbars=yes, resizable=yes, width=600, height=500");
}

function openwindow(url,w,h)
{
	window.open(url,"","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, width="+w+", height="+h);
}

function openEditWindow(url)
{
    var intwidth=700;
    var intheight=500;
    
	window.open(url,"","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=" + intwidth + ", height=" + intheight + ", left=" + ((screen.width - intwidth)  / 2) + ", top="+ ((screen.height - intheight)  / 2));

}

function getImgPath(imgID)
{	
        var fullPath = document.images[imgID].src;
		var fullPathLength = fullPath.length;
        var imgPath = '';

        for (var i=fullPathLength; i>=0; i--)
        {
                character = fullPath.substr(i,1);

                if (character == '/')
                {
                        break;
                }

        }
        
        imgPath = fullPath.substr(0,i) + '/';
        return imgPath;
}

function getURLParam(strParamName)
{
        var strReturn = "";
        var strHref = window.location.href;
        
        if ( strHref.indexOf("?") > -1 )
        {
                var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase();
                var aQueryString = strQueryString.split("&");

                for ( var iParam = 0; iParam < aQueryString.length; iParam++ )
                {
                        if ( aQueryString[iParam].indexOf(strParamName + "=") > -1 )
                        {
                                var aParam = aQueryString[iParam].split("=");
                                strReturn = aParam[1];
                                break;
                        }
                }
        }
        return strReturn;
}

function checkenter(e)
{	
	var code;
	if (!e) var e = window.event;
	if (e.keyCode) code = e.keyCode;
	else if (e.which) code = e.which;
	var character = String.fromCharCode(code);
	
	if (code == 13)
	{
		return 1;
	}
	else
	{
		return 0;
	}
}



