﻿/*
Returns HTML object
- elemId    - server id of the object (ex. tbFirstName)
- elemType  - HTML object type (ex. INPUT, SELECT, DIV, TR, TD, TABLE .. etc)
*/
function GetServerElement(elemId, elemType)
{
    var allElems = document.getElementsByTagName(elemType);
    
    for(i = 0; i < allElems; i++)
    {
        if(allElems[i].id.indexOf(elemId) > -1)
        {
            return allElems[i];
        }
    }
    
    return null;
}

/*
Returns HTML object position and dimensions
- obj.height, obj.width, obj.x, obj.y
*/
function GetPos(theObj)
{
    x = y = 0;
    h = theObj.offsetHeight;
    w = theObj.offsetWidth;
    
    while(theObj)
    {
        x += theObj.offsetLeft;
        y += theObj.offsetTop;
        theObj = theObj.offsetParent;
    }
    
    return {height:h,width:w,x:x,y:y}
}

function sendparameters(destination)
{
	document.getElementById('ifContent').src=destination;
}
	
