From: "Lagret av Windows Internet Explorer 8"
Subject: Presentasjoner fra ISFA-seminaret - www.fhl.no
Date: Tue, 25 Aug 2009 15:32:13 +0200
MIME-Version: 1.0
Content-Type: multipart/related;
type="text/html";
boundary="----=_NextPart_000_0000_01CA2599.37D5C160"
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049
This is a multi-part message in MIME format.
------=_NextPart_000_0000_01CA2599.37D5C160
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.fhl.no/markedsadgang/presentasjoner-fra-isfa-seminaret-article3409-21.html
I forbindelse med Aqua Nors 30-=E5rsjubileum ble det =
20. august=20
arrangert et seminar i regi av ISFA og Stiftelsen NorFishing. =
Presentasjonene er=20
n=E5 tilgjengelig for nedlasting.
Publisert: 25.08.09
Rundt 170 deltakere deltok p=E5 seminaret som =
ble arrangert=20
under havbruksmessen Aqua Nor i Trondheim.
Seminaret kom i stand i et samarbeid mellom International Salmon =
Farmers=20
Association (ISFA) og Stiftelsen NorFishing.
Foredragsholdere fra lakseproduserende land satte hverandre i stevne =
p=E5=20
seminaret, der en rekke fremtredende personer holdt foredrag.
Seminaret markerte b=E5de et tilbakeblikk p=E5 30 imponerende =E5r i =
norsk og=20
internasjonal laksen=E6ring, men rettet ogs=E5 blikket fremover mot nye =
oppgaver og=20
utfordringer.
Presentasjonene (pdf-format) kan lastes ned =
nedenfor.
DOWNLOAD: You can now download the =
presentations from the=20
Aqua Nor Anniversary Conference (Aqua Nor, Trondheim, August 20th=20
2009).
=0A=
* Advanced use: =0A=
* If you are going to call several async calls using the same =
callbackhandler, you =0A=
* will probably need a way to tell which instance/call that called your =
callbackhandler. This =0A=
* is not easy to do, but here is a workaround: =0A=
* Your callbackhandler needs to take the xmlHttpobject as the first =
argument, like e.g.: =0A=
* function myCallBackHandler(xmlHttpObject) {} =0A=
* When setting the callbackhandler, you need to do something like =
this: =0A=
* =0A=
* xmlObj =3D new CtXMLHttpRequest();=0A=
* xmlObj.setOnreadystatechange(function () { myCallBackHandler(xmlObj); =
}) ;=0A=
* =0A=
* =0A=
* The callbackhandler, myCallBackHandler(), will then be called with =
the belonging XMLHttpobject=0A=
* as the first argument, and you then know which object is calling you.=0A=
* =0A=
* @param functionname function to call when the readystate changes.=0A=
*/=0A=
CtXMLHttpRequest.prototype.SetOnreadystatechange =3D =
function(functionname) {=0A=
this.reqobject.onreadystatechange =3D functionname;=0A=
}=0A=
=0A=
=0A=
=0A=
/**=0A=
* opens the http connection=0A=
* =0A=
* @param method GET or POST=0A=
* @param url the url to open =0A=
* @param asyncFlag set to TRUE to run asynchronously, FALSE otherwise. =
Always use TRUE!=0A=
* @param username[optional] username if url requires logon=0A=
* @param password[optional] password if url requires logon=0A=
*/=0A=
CtXMLHttpRequest.prototype.open =3D function(method, url, asyncFlag, =
username, password) {=0A=
//alert("calling this.reqobject.open with method " + method + ", url =
" + url );=0A=
=0A=
if (this.browsertype =3D=3D "ie") {=0A=
var rand =3D Math.random(1000);=0A=
url +=3D "&ie_nocache_random_param"+ rand + "=3D" + rand; =0A=
}=0A=
//window.open(url);=0A=
=0A=
this.reqobject.open(method, url, asyncFlag, username, password);=0A=
}=0A=
=0A=
/**=0A=
* opens a CorePublish/CPLIB XMLHttpService - expects to talk to a =
CpXMLHttpRequestManager=0A=
* on the serverside. =0A=
* =0A=
* @param url the url to the CpXMLHttpRequestManager (including =
"filename.php" at the end but without "?")=0A=
* @param service the name of the service to open=0A=
* @param parameters array containing additional parameters to the =
service. use 'parametername' =3D> value style arrays=0A=
* @param responseFormat which format to retrive the result in, 'text' =
or 'xml'.=0A=
*/=0A=
CtXMLHttpRequest.prototype.openCorePublishService =3D function(url, =
service, responseFormat, parameters ) {=0A=
=0A=
var finalurl =3D url + "?service=3D" + service + =
"&responseformat=3D" + responseFormat;=0A=
=0A=
// append Anti CSRF protection=0A=
if (typeof (ctCgiAntiCSRFTokenUrlpart) !=3D "undefined" ) {=0A=
finalurl +=3D "&" + ctCgiAntiCSRFTokenUrlpart;=0A=
}=0A=
=0A=
if (parameters) {=0A=
for(var key in parameters) {=0A=
finalurl +=3D "&"+key+"=3D"+parameters[key];=0A=
}=0A=
}=0A=
=0A=
=0A=
=0A=
//alert(finalurl);=0A=
=0A=
this.open("GET", finalurl, true);=0A=
this.send();=0A=
}=0A=
=0A=
/**=0A=
* Sends the request. =0A=
* =0A=
* @param data the data to post. Set to null if not used.=0A=
*/=0A=
CtXMLHttpRequest.prototype.send =3D function(data) {=0A=
this.reqobject.send(data);=0A=
}=0A=
=0A=
/**=0A=
* Returns the ready state for this object.
=0A=
* 0 =3D uninitialized =0A=
* 1 =3D loading =0A=
* 2 =3D loaded =0A=
* 3 =3D interactive =0A=
* 4 =3D complete =0A=
* =0A=
* @return int the ready state=0A=
*/=0A=
CtXMLHttpRequest.prototype.getReadyState =3D function() {=0A=
return this.reqobject.readyState;=0A=
}=0A=
=0A=
/**=0A=
* returns whether the request is ready to be processes. =0A=
* if true is returned, this means that the request is ready =0A=
* to be processed and has no errors=0A=
* =0A=
*/=0A=
CtXMLHttpRequest.prototype.isReadyToProcess =3D function() {=0A=
=0A=
if (this.reqobject.readyState =3D=3D 4 && this.hasError() =3D=3D =
false) {=0A=
return true;=0A=
} else {=0A=
return false;=0A=
}=0A=
=0A=
}=0A=
=0A=
/**=0A=
* returns whether the request has errors=0A=
* If the request has errors, you can normally =0A=
* call the getErrorString() to get the error message=0A=
* Note that this function will always return true until =0A=
* the ready state is 4, meaning the request is finished.=0A=
* =0A=
*/=0A=
CtXMLHttpRequest.prototype.hasError =3D function() {=0A=
if ( this.getStatus() !=3D 200 && this.getReadyState() =3D=3D 4) {=0A=
return true;=0A=
} else {=0A=
return false;=0A=
}=0A=
}=0A=
=0A=
CtXMLHttpRequest.prototype.getErrorString =3D function() {=0A=
if ( this.hasError() =3D=3D false) {=0A=
return "";=0A=
} else {=0A=
switch (this.getStatus()) {=0A=
case "404":=0A=
// we need to handle this special, otherwise =0A=
// the responsetext will be set to the html output=0A=
// from the error page=0A=
return "the page requested could not be found. Check the url =
to the service";=0A=
break;=0A=
case "500":=0A=
default:=0A=
return "An internal service error occurred.";=0A=
=0A=
break;=0A=
}=0A=
}=0A=
return "";=0A=
}=0A=
=0A=
/**=0A=
* Returns the http statuscode=0A=
* e.g: =0A=
* 404 page not found =0A=
* 200 ok =0A=
* Please note that status is not always available in IE during =0A=
* processing, therefore "200" may be returned until=0A=
* the isreadytoprocess() method returns true. =0A=
* =0A=
*/=0A=
CtXMLHttpRequest.prototype.getStatus =3D function() {=0A=
try {=0A=
return this.reqobject.status;=0A=
} catch (e) {=0A=
// status is not always available in IE during =0A=
// processing, therefore return 200 ok until=0A=
// it is finished. =0A=
return 200;=0A=
}=0A=
}=0A=
=0A=
=0A=
/**=0A=
* Returns the http status as a string =0A=
* =0A=
* =0A=
*/=0A=
CtXMLHttpRequest.prototype.getStatusText =3D function() {=0A=
return this.reqobject.statusText;=0A=
}=0A=
=0A=
=0A=
/**=0A=
* returns the response from the request as a text string=0A=
* =0A=
* =0A=
*/=0A=
CtXMLHttpRequest.prototype.getResponseText =3D function() {=0A=
return this.reqobject.responseText;=0A=
}=0A=
=0A=
/**=0A=
* returns the response from the request as a XML document=0A=
* =0A=
* =0A=
*/=0A=
CtXMLHttpRequest.prototype.getResponseXML =3D function() {=0A=
return this.reqobject.responseXML;=0A=
}=0A=
=0A=
/**=0A=
* Aborts the current async request=0A=
* =0A=
* =0A=
*/=0A=
CtXMLHttpRequest.prototype.abort =3D function() {=0A=
return this.reqobject.abort;=0A=
}=0A=
=0A=
=0A=
/**=0A=
* Returns all response headers as a string=0A=
* =0A=
* =0A=
* =0A=
*/=0A=
CtXMLHttpRequest.prototype.getAllResponseHeaders =3D function() {=0A=
return this.reqobject.getAllResponseHeaders();=0A=
}=0A=
=0A=
/**=0A=
* Returns the specified response header as a string=0A=
* =0A=
* =0A=
* =0A=
*/=0A=
CtXMLHttpRequest.prototype.getResponseheader =3D function(headerLabel) {=0A=
return this.reqobject.getResponseheader(headerLabel);=0A=
}=0A=
=0A=
/**=0A=
* Sets a specific http request header.=0A=
* =0A=
* =0A=
* =0A=
*/=0A=
CtXMLHttpRequest.prototype.setRequestHeader =3D function(label, value) {=0A=
return this.reqobject.setRequestHeader(label, value);=0A=
}=0A=
=0A=
=0A=
=0A=
=0A=
=0A=
------=_NextPart_000_0000_01CA2599.37D5C160
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://corepublish.nsp01cp.nhosp.no/corepublish/cplib-common/ct_layer.js?appver=6.6.4
/*
DHTML library for CoreTrek AS, www.coretrek.com
written by Arve Skj=F8restad
functions on this object:
ct_layer
Properties:
.clickedX
.clickedY
methods:
.ct_layer(layName)
.setTop(t)
.getTop()
.setLeft(l)
.getLeft()
.getRight()
.getWidth()
.setWidth(wi)
.getHeight()
.getBottom()
.moveTo(l,t)
.moveBy(l,t)
.hide()
.show()
.setVisibility(v)
.write(theText)
.getZIndex()
.setZIndex(z)
=09
(not impl)
.clip
.getClipLeft
.getClipTop
.getClipRight
.getClipBottom
.getClipWidth
.getClipHeight
.scrollTo
.scrollBy
.setBgColor
.setBgImage
*/
//var objLayRef;
//var objLayName;
function ct_layer(layName)
{
//Make object reference
if (document.getElementById)=09
{
this.styleRef =3D document.getElementById(layName).style ;
this.layRef =3D document.getElementById(layName);
}
else if (document.layers)
{
this.styleRef =3D document.layers[layName];
this.layRef =3D this.styleRef;
}
else if (document.all)
{
this.styleRef =3D document.all[layName].style ;=09
this.layRef =3D document.all[layName];
}
// setting variables
this.objLayName=3DlayName;
// assigning functions
this.setTop =3D setTop;
this.getTop =3D getTop;
this.setLeft=3D setLeft;
this.getLeft=3D getLeft;
this.getRight=3DgetRight;
this.getWidth=3DgetWidth;
this.setWidth=3DsetWidth;
this.getHeight=3DgetHeight;
this.getBottom=3DgetBottom;
this.moveTo =3D moveTo;
this.moveBy =3D moveBy;
this.hide =3D hide;
this.show =3D show;
this.setVisibility=3D setVisibility;
this.isVisible=3D isVisible;
this.write=3Dwrite;
this.setZIndex =3D setZIndex;
this.getZIndex =3D getZIndex;
this.scrollLayerBy=3DscrollLayerBy;
this.getClipLeft=3DgetClipLeft;
this.getClipTop=3DgetClipTop;
this.getClipRight=3DgetClipRight;
this.getClipBottom=3DgetClipBottom;
this.clipLayer=3DclipLayer;
this.setSource=3D setSource;
=20
this.clickedX =3D this.getLeft();
this.clickedY =3D this.getTop();
}
function getRef() { return this.styleRef; }
function setTop(t) { this.styleRef.top =3D t ; }
function getTop() { return parseInt(this.styleRef.top); }
function setLeft(l) { this.styleRef.left =3D l ; }
function getLeft() { return parseInt(this.styleRef.left); }
function getRight() { return getLeft() + getWidth(); }
function getWidth()=20
{
if (document.layers)=20
{
if (this.styleRef.document.width)
return(this.styleRef.document.width);
else
return(this.styleRef.clip.right - this.styleRef.clip.left);
}
else if (document.all)=20
{
if (this.styleRef.pixelWidth)
return(this.styleRef.pixelWidth);
else
return(document.all[this.objLayName].clientWidth);
}=09
else if (document.getElementById)
{
return parseInt(this.layRef.offsetWidth);
}
else
return false;
}
function setWidth(wi)
{
if (document.layers)=20
{
this.styleRef.resizeTo(wi,this.getHeight());
}
else if (document.all)=20
{
this.layRef.offsetWidth=3D wi;
//this.styleRef.width =3D wi;
}=09
else if (document.getElementById)
{
this.styleRef.width =3D wi;
}
else
return false;=20
}
function getHeight()=20
{
if (document.layers)=20
{
if (this.styleRef.document.height)
return(this.styleRef.document.height);
else
return(this.styleRef.clip.bottom - this.styleRef.clip.top);
}
else if (document.all)=20
{
if (false && this.styleRef.pixelHeight)
return(this.styleRef.pixelHeight);
else
return(document.all[this.objLayName].clientHeight);
}
else if (document.getElementById)
{
return(parseInt(this.layRef.offsetHeight));
}
else
return false;
}
function getBottom() { return getTop()+getHeight() ; }
function moveTo(l,t) {
if(document.layers) {
this.styleRef.moveTo(l,t);
} else {
try {
this.styleRef.left =3D ''+l+'px';
this.styleRef.top =3D ''+t+'px';
} catch (e) {
alert('error:' + e);
}
}
}
function moveBy(l,t)
{
if(document.layers)
this.styleRef.moveBy(l,t);
else
{
this.styleRef.left +=3D l;
this.styleRef.top +=3D t;
}
}
function setVisibility(v)
{=09
//Different words...Fix it!!=09
//If Netscape words are given, set NSv to this, and change v to DOM =
words
//else set NSv to Netscape words=09
if(v=3D=3D"hidden" || v=3D=3D"hide")=20
{
NSv=3D"hide";
v =3D"hidden";
}
else=20
{
NSv=3D"show";
v =3D"visible";
}
if (document.getElementById)=09
this.styleRef.visibility =3D v;
=09
else if (document.layers)
this.styleRef.visibility =3D NSv ;
else if (document.all)
this.styleRef.visibility =3D v ;=09
else
return false;
}
function isVisible() {
if (document.getElementById)=09
if(this.styleRef.visibility =3D=3D "hidden")
return false;
else=20
return true;
=09
else if (document.layers)
if(this.styleRef.visibility =3D=3D "hide")
return false;
else=20
return true;
else if (document.all)
if(this.styleRef.visibility =3D=3D "hidden")
return false;
else=20
return true;
}
function hide() { this.setVisibility("hidden"); }
function show() { this.setVisibility("visible"); }
function write(theText)
{
if (document.layers)
{
this.styleRef.document.write(theText);
this.styleRef.document.close();
}
else if (document.all)
document.all[this.objLayName].innerHTML =3DtheText;
else if(document.getElementById)
document.getElementById(this.objLayName).innerHTML =3DtheText;
else
return false;
}
function getZIndex() { return this.styleRef.zIndex; }
function setZIndex(z) { this.styleRef.zIndex=3Dz; }
function clipLayer(clipleft, cliptop, clipright, clipbottom) {
if (document.layers) {
this.layRef.clip.left =3D clipleft;
this.layRef.clip.top =3D cliptop;
this.layRef.clip.right =3D clipright;
this.layRef.clip.bottom =3D clipbottom;
}
if (document.all)
this.layRef.style.clip =3D 'rect(' + cliptop + ' ' + clipright + ' =
' + clipbottom + ' ' + clipleft +')';
}
function scrollLayerTo(x, y, bound)=20
{
var dx =3D getClipLeft() - x;
var dy =3D getClipTop() - y;
=20
scrollLayerBy( -dx, -dy, bound);
}
function scrollLayerBy(dx, dy, bound)=20
{
var cl =3D this.getClipLeft();
var ct =3D this.getClipTop();
var cr =3D this.getClipRight();
var cb =3D this.getClipBottom();
=20
if (bound)=20
{
if (cl + dx < 0)
dx =3D -cl;
=20
else if (cr + dx > getWidth())
dx =3D getWidth() - cr;
if (ct + dy < 0)
dy =3D -ct;
else if (cb + dy > getHeight())
dy =3D getHeight() - cb;
}
this.clipLayer( cl + dx, ct + dy, cr + dx, cb + dy);
this.moveBy(-dx, -dy);
}
function getClipLeft()=20
{
if (document.layers)
return this.layRef.clip.left;
if (document.all)=20
{
var str =3D this.layRef.style.clip;
if (!str)
return(0);
var clip =3D getIEClipValues(this.layRef.style.clip);
return(clip[3]);
}
return(-1);
}
function getClipTop()=20
{
if (document.layers)
return(this.layRef.clip.top);
if (document.all)=20
{
var str =3D this.layRef.style.clip;
if (!str)
return(0);
var clip =3D getIEClipValues(this.layRef.style.clip);
return(clip[0]);
} =20
return(-1);
}
function getClipRight()=20
{
if (document.layers)
return(this.layRef.clip.right);
if (document.all)=20
{
var str =3D this.layRef.style.clip;
if (!str)
return(this.layRef.style.pixelWidth);
var clip =3D getIEClipValues(this.layRef.style.clip);
return(clip[1]);
}
return(-1);
}
function getClipBottom()=20
{
if (document.layers)
return(this.layRef.clip.bottom);
if (document.all)=20
{
var str =3D this.layRef.style.clip;
if (!str)
return(this.layRef.style.pixelHeight);
var clip =3D getIEClipValues(this.layRef.style.clip);
return(clip[2]);
}
return(-1);
}
function getClipWidth()=20
{
if (document.layers)
return(this.layRef.clip.width);
if (document.all)=20
{
var str =3D this.layRef.style.clip;
if (!str)
return(this.layRef.style.pixelWidth);
var clip =3D getIEClipValues(this.layRef.style.clip);
return(clip[1] - clip[3]);
}
return(-1);
}
function getClipHeight()=20
{
if (document.layers)
return(this.layRef.clip.height);
if (isMinIE4)=20
{
var str =3D this.layRef.style.clip;
if (!str)
return(this.layRef.style.pixelHeight);
var clip =3D getIEClipValues(this.layRef.style.clip);
return(clip[2] - clip[0]);
}
return(-1);
}
function getIEClipValues(str)=20
{
var clip =3D new Array();
var i;
// Parse out the clipping values for IE layers.
=20
i =3D str.indexOf("(");
clip[0] =3D parseInt(str.substring(i + 1, str.length), 10);
i =3D str.indexOf(" ", i + 1);
clip[1] =3D parseInt(str.substring(i + 1, str.length), 10);
i =3D str.indexOf(" ", i + 1);
clip[2] =3D parseInt(str.substring(i + 1, str.length), 10);
i =3D str.indexOf(" ", i + 1);
clip[3] =3D parseInt(str.substring(i + 1, str.length), 10);
return(clip);
}
function setSource(win_url,width,height,scrolling)
{
sc =3D "no";
if (document.layers)=20
{
this.layRef.src =3D win_url;
}=20
else // If IE or NS 6, write an iframe.
{
extra =3D"";
if(width && height)
extra =3D " width=3D\""+width+"\" height=3D\""+height+"\" ";
else
extra =3D"";
if(scrolling =3D=3D true)
sc=3D"yes";
// Write inner HTML for layer
theHTML =3D "";
this.layRef.innerHTML=3D theHTML;
}
}
/*
=09
(not impl)
.clip
.getClipLeft
.getClipTop
.getClipRight
.getClipBottom
.getClipWidth
.getClipHeight
.scrollTo
.scrollBy
.setBgColor
.setBgImage
*/
------=_NextPart_000_0000_01CA2599.37D5C160
Content-Type: application/octet-stream
Content-Transfer-Encoding: quoted-printable
Content-Location: http://corepublish.nsp01cp.nhosp.no/corepublish/cplib-common/cplib.js?appver=6.6.4
/**=0A=
* Common JavaScript functions for=0A=
*=0A=
* CPLIB - CorePublish=0A=
*/=0A=
=0A=
// variable declarations=0A=
var cp2_loaded =3D false;=0A=
var cp2_keywordlayer;=0A=
var x;=0A=
var y;=0A=
=0A=
=0A=
/* =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
Common functions =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D */=0A=
=0A=
/**=0A=
* Function to init=0A=
*/=0A=
function cp2_init() {=0A=
// Mouse position capture=0A=
ns4 =3D document.layers?true:false;=0A=
ns5 =3D (document.getElementById && !document.all)?true:false;=0A=
ie5 =3D document.all?true:false;=0A=
ie4 =3D (!document.getElementById && document.all)?true:false;=0A=
=0A=
if(ns4) {=0A=
document.captureEvents(Event.MOUSEMOVE);=0A=
}=0A=
=0A=
document.onmousemove=3DcatchXY;=0A=
=0A=
// Tell that document is loaded.=0A=
cp2_loaded =3D true;=0A=
}=0A=
=0A=
// Calling the init function.=0A=
window.onload =3D cp2_init;=0A=
document.onclick =3D cp2_keywords_hide;=0A=
=0A=
var cpNavigatorUserAgent =3D navigator.userAgent.toLowerCase() ;=0A=
var cpNavigatorUserAgentInfo =3D {=0A=
isIE : (cpNavigatorUserAgent.indexOf('msie')>-1),=0A=
isIE7 : (cpNavigatorUserAgent.indexOf('msie 7')>-1),=0A=
isGecko : (cpNavigatorUserAgent.indexOf('gecko/')>-1),=0A=
isSafari : (cpNavigatorUserAgent.indexOf('safari')>-1),=0A=
isOpera : (cpNavigatorUserAgent.indexOf('opera')>-1),=0A=
isMac : (cpNavigatorUserAgent.indexOf('macintosh')>-1)=0A=
};=0A=
=0A=
/**=0A=
* Function that reads a cookies value. Returns null if the requested =
cookie is not found=0A=
*/=0A=
function cpReadCookie(cookieName){=0A=
cookieName +=3D '=3D';=0A=
var cookies =3D document.cookie.split(';');=0A=
for (var i=3D0; i 1 ) {=0A=
win_props =3D props ;=0A=
} else {=0A=
win_props =
=3D"height=3D"+height+",width=3D"+width+",screenX=3D400,screenY=3D100";=0A=
}=0A=
=0A=
// TODO: added return from corepublish.js to window.open, check that =
this does not break anything=0A=
return window.open(win_url,win_name,win_props);=0A=
}=0A=
=0A=
=0A=
/**=0A=
* Function that returns the position for the given element.=0A=
*/=0A=
function getAbsoluteElementPosition(el){=0A=
var origEl =3D el;=0A=
for(var lx=3D0,ly=3D0;el!=3Dnull;=0A=
lx+=3Del.offsetLeft-((el.offsetParent && =
el.offsetParent.offsetParent)?el.offsetParent.scrollLeft:0),=0A=
ly+=3Del.offsetTop-((el.offsetParent && =
el.offsetParent.offsetParent)?el.offsetParent.scrollTop:0),=0A=
el=3Del.offsetParent); // end: for=0A=
el =3D origEl;=0A=
if(el && !document.all) {=0A=
do {=0A=
if(el.parentNode && !(el.parentNode.tagName && =
el.parentNode.tagName.toUpperCase()=3D=3D'BODY')) {=0A=
if (el.parentNode.scrollTop) {=0A=
ly -=3D el.parentNode.scrollTop;=0A=
}=0A=
if (el.parentNode.scrollLeft) {=0A=
lx -=3D el.parentNode.scrollLeft;=0A=
}=0A=
}=0A=
} while (el =3D el.parentNode);=0A=
}=0A=
return {x:lx,y:ly}=0A=
}=0A=
=0A=
/**=0A=
* Scroll container to display the element.=0A=
*/=0A=
function scrollToElement(container, element) {=0A=
container =3D getElement(container);=0A=
element =3D findSubElement(container, element);=0A=
=0A=
// If element is null the provided element is not a child of the=0A=
// scrollElement. Since we cannot scroll to a noexisting element we =
simply=0A=
// return=0A=
if(element =3D=3D null) {=0A=
return;=0A=
}=0A=
=0A=
var offsetTop =3D 0;=0A=
el =3D element;=0A=
do {=0A=
offsetTop +=3D el.offsetTop;=0A=
el =3D el.offsetParent;=0A=
} while(el && findSubElement(el, container) =3D=3D null);=0A=
=0A=
container.scrollTop =3D offsetTop - container.offsetTop;=0A=
}=0A=
=0A=
/**=0A=
* Find a spesific element below a containing parent. Both elements can =
be=0A=
* either a full element object or a element id. The function returns =
false=0A=
* if the element is not found as an ancestor to the container.=0A=
*/=0A=
function findSubElement(container, element) {=0A=
container =3D getElement(container);=0A=
element =3D getElement(element);=0A=
=0A=
var children =3D container.childNodes;=0A=
for(var i=3D0; i';=0A=
objectSettings +=3D '';=0A=
objectSettings +=3D '';=0A=
=0A=
mimeType =3D 'application/x-shockwave-flash';=0A=
src =3D CPLIBHTMLROOT +'/mediaplayer.swf';=0A=
}=0A=
=0A=
// Handling IE specialties=0A=
var rewriteMimeType =3D new Object();=0A=
if (cpNavigatorUserAgentInfo.isIE){=0A=
rewriteMimeType['audio/mpeg'] =3D 'application/x-mplayer2';=0A=
rewriteMimeType['video/mpeg'] =3D 'application/x-mplayer2';=0A=
rewriteMimeType['video/x-msvideo'] =3D 'video/x-ms-wmv';=0A=
}=0A=
// In some cases we must change the mimetype for IE :/=0A=
if (rewriteMimeType[mimeType] !=3D null){=0A=
mimeType =3D rewriteMimeType[mimeType];=0A=
}=0A=
=0A=
// Add object parameters=0A=
if (mimeType !=3D 'application/x-shockwave-flash') {=0A=
objectSettings +=3D '';=0A=
objectSettings +=3D '';=0A=
objectSettings +=3D '';=0A=
} else {=0A=
objectSettings +=3D '';=0A=
if(typeof flashVars !=3D "undefined") {=0A=
objectSettings +=3D '';=0A=
}=0A=
}=0A=
=0A=
// IE: We need to add sessionid to the URL in order for the video =
plugin to use the same session=0A=
// as IE. If sessionid is not sent, the video plugin will try to =
load the URL without a valid=0A=
// session causing the session to be destoyed.=0A=
// -----------------------------=0A=
// NOTE from Kurt: The session id broke together with the new JW =
FLV player. I first tried removing=0A=
// this alltogether, and it seem to work, event with user =
protected files. I can't get it=0A=
// to break whatever I do. To be sure not to reintroduce old =
bugs, I move this session stuff=0A=
// down here. This way it will be added for the non JW FLV =
players.=0A=
if (cpNavigatorUserAgentInfo.isIE){=0A=
var sep =3D (src.indexOf('?') > -1?'&':'?');=0A=
var sessionID =3D cpReadCookie(sessionName);=0A=
if (sessionID !=3D null && sessionID.length > 0){=0A=
var src =3D src +sep +sessionName +'=3D' +sessionID;=0A=
}=0A=
}=0A=
=0A=
// Build object tag and content=0A=
var objectString =3D '';=0A=
var objectStringStart =3D '';=0A=
switch (mimeType) {=0A=
case 'application/x-shockwave-flash':=0A=
if (cpNavigatorUserAgentInfo.isIE){=0A=
var objectStringStart =3D '