function BytBild(id, imgsrc) {
	document.getElementById(id).setAttribute('src', imgsrc);
}

function popUp(url, width, height, scrollbars, resizable) {
	props=window.open(url, 'poppage', 'toolbars=0, scrollbars=' + scrollbars + ', location=0, statusbars=0, menubars=0, resizable=' + resizable + ', width=' + width + ', height=' + height + ' left = 100, top = 100');
}

function SkickaVidarePopUp (url)
{
opener.parent.location.href=url;
window.close();
}

function SkickaVidare (url)
{
window.location=url;
}

function Infoga(myField, myValue) {
        //Infoga(document.formName.fieldName, ‘this value’);
        //IE support
        if (document.selection) {
                myField.focus();
                sel = document.selection.createRange();
                sel.text = myValue;
        } else if (myField.selectionStart || myField.selectionStart == '0') { //MOZILLA/NETSCAPE support
                var startPos = myField.selectionStart;
                var endPos = myField.selectionEnd;
                myField.value = myField.value.substring(0, startPos)
                + myValue
                + myField.value.substring(endPos, myField.value.length);
        } else {
        myField.value += myValue;
        }
}
function gbokskicka () {
        reg2=/ /img;
        start=0;
        stop=reg2.exec(document.frm_gb2005.frm_h2005.value);
        if (stop !== null && stop !== 0) {document.frm_gb2005.frm_h2005.value=document.frm_gb2005.frm_h2005.value.substring(start,stop.index);}
        reg=/(http|www)/img;
        if(!reg.test(document.frm_gb2005.frm_m2005.value)) {
                document.frm_gb2005.frm_confirm.value = "bvsd";
                return true;
        } else {
                return false;
        }
}
