cacheD=111111111;
function updateContent(_1,_2){
var _3="main";
if(!$(_3)){
_3="content";
}
if($(_3)&&_1){
var _4=new Ajax.Updater(_3,_1,{method:"get",parameters:_2,evalScripts:true,onComplete:function(){
startup();
}});
}
}
function updatePopUp(_5,_6){
var _7="popupArea";
if(!$(_7)){
_7="content";
}
Effect.BlindDown(_7);
if($(_7)&&_5){
var _8=new Ajax.Updater(_7,_5,{method:"get",parameters:_6,onComplete:function(){
startup();
}});
}
}
function updatePublish(_9,_a,_b){
if(window.confirm("Are you sure you want to publish your changes and make them available to students?")){
if(!$(_9)){
_9="publishMessage";
}
try{
$(_9).innerHTML="<p><img src='images/spinner.gif' /> Publishing...please wait</p>";
Effect.BlindDown(_9);
}
catch(e){
}
if($(_9)&&_a){
var _c=new Ajax.Request(_a,{method:"get",asynchronous:true,parameters:_b,onComplete:function(){
shrinkMessage(_9,"<strong>Done !!</strong>");
}});
}
}
}
function showAddPageForm(_d,_e,_f){
if(!$(_d)){
_d="publishMessage";
}
$(_d).show();
$(_d).setStyle({position:"relative",margin:"0 auto",width:"550px",border:"1px solid #111"});
if($(_d)&&_e){
var _10=new Date();
_e=_e+"&date="+_10.getTime();
myAjax=new Ajax.Updater(_d,_e,{method:"get",parameters:_f,evalScripts:true,onComplete:function(){
Effect.Highlight("addPageForm");
$shortTitle.focus();
}});
}
}
function showEditElementForm(_11,_12,_13){
if(!$(_11)){
_11="publishMessage";
}
$(_11).show();
$(_11).setStyle({position:"relative",margin:"0 auto",width:"95%",border:"1px solid #111"});
if($(_11)&&_12){
myAjax=new Ajax.Updater(_11,_12,{method:"get",parameters:_13,evalScripts:true,onComplete:function(){
Effect.ScrollTo("edit");
tinyMCEmode=false;
}});
}
}
function shrinkMessage(_14,msg){
if(!msg){
var msg="Done!!";
}
$(_14).innerHTML=msg;
Effect.BlindUp(_14,{duration:6});
}
function chooseSubtemplates(_16,_17,_18){
if(!$(_16)){
_16="selectSubtemplates";
}
if($(_16)&&_17){
new Ajax.Updater(_16,_17,{method:"get",evalScripts:true,parameters:_18});
}
}
function updateSubtemplatesList(_19){
if(!$(_19)){
_19="subtemplatesListForm";
}
pars=getRequestBody($(_19));
try{
}
catch(e){
}
if($(_19)){
var _1a=new Ajax.Request("start.pyg",{parameters:pars,onComplete:function(){
shrinkMessage(_19,"<strong>Done !!</strong>");
document.location.reload(true);
}});
}
}
function closeSubtemplatesForm(_1b){
if(!$(_1b)){
_1b="subtemplatesListForm";
}
try{
Effect.BlindUp(_1b,{duration:1});
_1b.update("");
}
catch(e){
}
}
function encodeNameAndValue(_1c,_1d){
var _1e=encodeURIComponent(_1c);
_1e+="=";
_1e+=encodeURIComponent(_1d);
return _1e;
}
function getRequestBody(_1f){
var _20=new Array();
for(var i=0;i<_1f.elements.length;i++){
var _22=_1f.elements[i];
switch(_22.type){
case "button":
case "submit":
case "reset":
break;
case "checkbox":
case "radio":
if(!_22.checked){
break;
}
case "text":
case "hidden":
case "password":
_20.push(encodeNameAndValue(_22.name,_22.value));
break;
default:
switch(_22.tagName.toLowerCase()){
case "select":
_20.push(encodeNameAndValue(_22.name,_22.options[_22.selectedIndex].value));
break;
default:
_20.push(encodeNameAndValue(_22.name,_22.value));
}
}
}
return _20.join("&");
}
function menuFormBeforeSubmit(){
var _23=document.forms["edit"];
var _24="";
if(_23.title.value==""){
alert("title is required");
_23.title.focus();
return false;
}
for(var i=0;i<_23.showIn.length;i++){
if(_23.showIn[i].checked){
_24=_23.showIn[i].value;
break;
}
}
if(_24=="side"){
_23.showInNavi.value="yes";
_23.showInHeaderBar.value="no";
}else{
if(_24=="top"){
_23.showInNavi.value="no";
_23.showInHeaderBar.value="yes";
}else{
if(_24=="both"){
_23.showInNavi.value="yes";
_23.showInHeaderBar.value="yes";
}else{
_23.showInNavi.value="no";
_23.showInHeaderBar.value="no";
}
}
}
_23.submit();
}
function loadTopics(_26){
var _27="topicsContainer";
var _28="start.pyg?cmd=copyListFromCourse&courseidentifier="+_26;
if(typeof (_26)==undefined||_26==""){
return;
}
if(!$(_27)){
return;
}
var _29=new Ajax.Updater(_27,_28,{method:"get",evalScripts:true});
}
function submitCommentAction(_2a){
_2a.pageUrl.value=document.URL;
new Ajax.Updater("pageComments",_2a.action,{method:"post",parameters:$("commentsForm").serialize()});
$("commentsForm").reset();
}
function updateCommentsNum(_2b,_2c){
if(typeof (_2b)=="undefined"){
_2b="spanComment";
}
if($(_2b)){
new Ajax.Updater(_2b,_2c,{method:"get"});
}
}
function showLevel(_2d,_2e,_2f,_30){
if(_30==undefined){
_30="appear";
}
var _31=document.getElementById(_2d);
var _32=eval("document.getElementById(\"span"+_2d+"\")");
if(_31.style.display=="none"){
Effect.toggle($(_2d),_30);
_32.innerHTML=_2e;
}else{
Effect.toggle(_2d,_30);
_32.innerHTML=_2f;
}
adjustParentHeight(_2d);
}
function showHide(_33,obj,_35,_36,_37,_38){
var url;
var _3a;
var _3b;
var _3c=getObj(_33);
if(_38==undefined){
_38="appear";
}
if(_3c.innerHTML=="shown"){
url=_36;
_3a="hidden";
_3b="none";
}else{
url=_37;
_3a="shown";
_3b="block";
}
_3c.innerHTML=_3a;
obj.src=url;
Effect.toggle(_35,_38);
adjustParentHeight(_35);
}
function getObj(_3d){
return document.getElementById(_3d);
}
function showHideTimer(_3e,id){
document.getElementById(id).style.visibility="visible";
setTimeout("document.getElementById(\""+id+"\").style.visibility=\"hidden\";",_3e);
}
function inTab(elm){
var _41=false;
var _42=false;
try{
_42=$(elm).parentNode;
}
catch(e){
_42=$(elm).nextSibling;
}
while(_42){
try{
if(_42.hasClassName("accordion_content")||_42.hasClassName("section")){
_41=_42;
break;
}
}
catch(e){
}
_42=_42.parentNode;
}
return _41;
}
function myHighlight(elm){
var _44="";
var _45="";
var _46="";
_44=inTab(elm);
if(_44){
_45=Element.identify($(_44)).replace("_content","");
if(_44.hasClassName("section")){
_46=_45.split("_")[0]+"__";
my_glider.moveTo(_45,my_glider.scroller,{duration:my_glider.options.duration});
new Effect.Highlight(elm,{duration:3});
new Effect.ScrollTo(elm);
}else{
if(_44.hasClassName("accordion_content")){
try{
new Effect.BlindDown(_44,{duration:0.5});
new Effect.ScrollTo(Element.previous(_44),{duration:1.5,queue:"end"});
new Effect.Highlight(elm,{duration:3,queue:"end"});
}
catch(e){
new Effect.ScrollTo(elm,{duration:1.5});
new Effect.Highlight(elm,{duration:3});
}
}else{
new Effect.ScrollTo(elm,{duration:1.5});
new Effect.Highlight(elm,{duration:3});
}
}
}else{
new Effect.ScrollTo(elm,{duration:1.5});
new Effect.Highlight(elm,{duration:3});
}
return false;
}
function adjustParentHeight(_47){
var _48;
var _49=0;
var _4a="";
var _4b=0;
_48=inTab(_47);
if(_48){
var _4c=$(_47).style.display;
var _4d=0;
if($(_47).clientHeight==0){
document.getElementById(_47).style.display="block";
_49=$(_47).getHeight();
document.getElementById(_47).style.display="none";
}else{
_49=$(_47).clientHeight;
}
if($(_48).up(".scroller")){
_4a=$(_48).up(".scroller");
_4d=_4a.getHeight();
}else{
_4a=_48;
_4d=$(_48).getHeight();
}
if(_4c=="none"){
_4b=_4d+_49;
}else{
_4b=_4d-_49;
}
$(_4a).setStyle({height:_4b+"px"});
}
}
function checkTarget(_4e){
var _4f;
if(_4e.indexOf("#")>-1){
_4f=_4e.split("#")[1];
if(inTab(_4f)){
myHighlight(_4f);
}
}
}
function moveItem(_50,_51){
if(typeof (_50)==typeof ("")){
_50=$(_50);
}
if(typeof (_51)==typeof ("")){
_51=$(_51);
}
_50.parentNode.removeChild(_50);
_51.appendChild(_50);
}
var niftyOk=(document.getElementById&&document.createElement&&Array.prototype.push);
var niftyCss=false;
String.prototype.find=function(_52){
return (this.indexOf(_52)>=0?true:false);
};
var oldonload=window.onload;
if(typeof (NiftyLoad)!="function"){
NiftyLoad=function(){
};
}
if(typeof (oldonload)=="function"){
window.onload=function(){
oldonload();
AddCss();
NiftyLoad();
};
}else{
window.onload=function(){
AddCss();
NiftyLoad();
};
}
function AddCss(){
niftyCss=true;
var l=CreateEl("link");
l.setAttribute("type","text/css");
l.setAttribute("rel","stylesheet");
l.setAttribute("href","niftyCorners.css");
l.setAttribute("media","screen");
document.getElementsByTagName("head")[0].appendChild(l);
}
function Nifty(_54,_55){
if(niftyOk==false){
return;
}
if(niftyCss==false){
AddCss();
}
var i,v=_54.split(","),h=0;
if(_55==null){
_55="";
}
if(_55.find("fixed-height")){
h=getElementsBySelector(v[0])[0].offsetHeight;
}
for(i=0;i<v.length;i++){
Rounded(v[i],_55);
}
if(_55.find("height")){
SameHeight(_54,h);
}
}
function Rounded(_59,_5a){
var i,top="",_5d="",v=new Array();
if(_5a!=""){
_5a=_5a.replace("left","tl bl");
_5a=_5a.replace("right","tr br");
_5a=_5a.replace("top","tr tl");
_5a=_5a.replace("bottom","br bl");
_5a=_5a.replace("transparent","alias");
if(_5a.find("tl")){
top="both";
if(!_5a.find("tr")){
top="left";
}
}else{
if(_5a.find("tr")){
top="right";
}
}
if(_5a.find("bl")){
_5d="both";
if(!_5a.find("br")){
_5d="left";
}
}else{
if(_5a.find("br")){
_5d="right";
}
}
}
if(top==""&&_5d==""&&!_5a.find("none")){
top="both";
_5d="both";
}
v=getElementsBySelector(_59);
for(i=0;i<v.length;i++){
FixIE(v[i]);
if(top!=""){
AddTop(v[i],top,_5a);
}
if(_5d!=""){
AddBottom(v[i],_5d,_5a);
}
}
}
function AddTop(el,_60,_61){
var d=CreateEl("b"),lim=4,_64="",p,i,_67="r",bk,_69;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(_61.find("alias")||(_69=getBk(el))=="transparent"){
_69="transparent";
bk="transparent";
_64=getParentBk(el);
_67="t";
}else{
bk=getParentBk(el);
_64=Mix(_69,bk);
}
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Top");
if(_61.find("small")){
d.style.marginBottom=(p-2)+"px";
_67+="s";
lim=2;
}else{
if(_61.find("big")){
d.style.marginBottom=(p-10)+"px";
_67+="b";
lim=8;
}else{
d.style.marginBottom=(p-5)+"px";
}
}
for(i=1;i<=lim;i++){
d.appendChild(CreateStrip(i,_60,_69,_64,_67));
}
el.style.paddingTop="0";
el.insertBefore(d,el.firstChild);
}
function AddBottom(el,_6b,_6c){
var d=CreateEl("b"),lim=4,_6f="",p,i,_72="r",bk,_74;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(_6c.find("alias")||(_74=getBk(el))=="transparent"){
_74="transparent";
bk="transparent";
_6f=getParentBk(el);
_72="t";
}else{
bk=getParentBk(el);
_6f=Mix(_74,bk);
}
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Bottom");
if(_6c.find("small")){
d.style.marginTop=(p-2)+"px";
_72+="s";
lim=2;
}else{
if(_6c.find("big")){
d.style.marginTop=(p-10)+"px";
_72+="b";
lim=8;
}else{
d.style.marginTop=(p-5)+"px";
}
}
for(i=lim;i>0;i--){
d.appendChild(CreateStrip(i,_6b,_74,_6f,_72));
}
el.style.paddingBottom=0;
el.appendChild(d);
}
function CreateStrip(_75,_76,_77,_78,_79){
var x=CreateEl("b");
x.className=_79+_75;
x.style.backgroundColor=_77;
x.style.borderColor=_78;
if(_76=="left"){
x.style.borderRightWidth="0";
x.style.marginRight="0";
}else{
if(_76=="right"){
x.style.borderLeftWidth="0";
x.style.marginLeft="0";
}
}
return (x);
}
function CreateEl(x){
return (document.createElement(x));
}
function FixIE(el){
if(el.currentStyle!=null&&el.currentStyle.hasLayout!=null&&el.currentStyle.hasLayout==false){
el.style.display="inline-block";
}
}
function SameHeight(_7d,_7e){
var i,v=_7d.split(","),t,j,els=[],gap;
for(i=0;i<v.length;i++){
t=getElementsBySelector(v[i]);
els=els.concat(t);
}
for(i=0;i<els.length;i++){
if(els[i].offsetHeight>_7e){
_7e=els[i].offsetHeight;
}
els[i].style.height="auto";
}
for(i=0;i<els.length;i++){
gap=_7e-els[i].offsetHeight;
if(gap>0){
t=CreateEl("b");
t.className="niftyfill";
t.style.height=gap+"px";
nc=els[i].lastChild;
if(nc.className=="niftycorners"){
els[i].insertBefore(t,nc);
}else{
els[i].appendChild(t);
}
}
}
}
function getElementsBySelector(_85){
var i,j,_88="",_89="",tag=_85,_8b="",v2,k,f,a,s=[],_91=[],c;
if(_85.find("#")){
if(_85.find(" ")){
s=_85.split(" ");
var fs=s[0].split("#");
if(fs.length==1){
return (_91);
}
f=document.getElementById(fs[1]);
if(f){
v=f.getElementsByTagName(s[1]);
for(i=0;i<v.length;i++){
_91.push(v[i]);
}
}
return (_91);
}else{
s=_85.split("#");
tag=s[0];
_88=s[1];
if(_88!=""){
f=document.getElementById(_88);
if(f){
_91.push(f);
}
return (_91);
}
}
}
if(_85.find(".")){
s=_85.split(".");
tag=s[0];
_89=s[1];
if(_89.find(" ")){
s=_89.split(" ");
_89=s[0];
_8b=s[1];
}
}
var v=document.getElementsByTagName(tag);
if(_89==""){
for(i=0;i<v.length;i++){
_91.push(v[i]);
}
return (_91);
}
for(i=0;i<v.length;i++){
c=v[i].className.split(" ");
for(j=0;j<c.length;j++){
if(c[j]==_89){
if(_8b==""){
_91.push(v[i]);
}else{
v2=v[i].getElementsByTagName(_8b);
for(k=0;k<v2.length;k++){
_91.push(v2[k]);
}
}
}
}
}
return (_91);
}
function getParentBk(x){
var el=x.parentNode,c;
while(el.tagName.toUpperCase()!="HTML"&&(c=getBk(el))=="transparent"){
el=el.parentNode;
}
if(c=="transparent"){
c="#FFFFFF";
}
return (c);
}
function getBk(x){
var c=getStyleProp(x,"backgroundColor");
if(c==null||c=="transparent"||c.find("rgba(0, 0, 0, 0)")){
return ("transparent");
}
if(c.find("rgb")){
c=rgb2hex(c);
}
return (c);
}
function getPadding(x,_9b){
var p=getStyleProp(x,"padding"+_9b);
if(p==null||!p.find("px")){
return (0);
}
return (parseInt(p));
}
function getStyleProp(x,_9e){
if(x.currentStyle){
return (x.currentStyle[_9e]);
}
if(document.defaultView.getComputedStyle){
return (document.defaultView.getComputedStyle(x,"")[_9e]);
}
return (null);
}
function rgb2hex(_9f){
var hex="",v,h,i;
var _a4=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;
var h=_a4.exec(_9f);
for(i=1;i<4;i++){
v=parseInt(h[i]).toString(16);
if(v.length==1){
hex+="0"+v;
}else{
hex+=v;
}
}
return ("#"+hex);
}
function Mix(c1,c2){
var i,_a8,_a9,x,y,r=new Array(3);
if(c1.length==4){
_a8=1;
}else{
_a8=2;
}
if(c2.length==4){
_a9=1;
}else{
_a9=2;
}
for(i=0;i<3;i++){
x=parseInt(c1.substr(1+_a8*i,_a8),16);
if(_a8==1){
x=16*x+x;
}
y=parseInt(c2.substr(1+_a9*i,_a9),16);
if(_a9==1){
y=16*y+y;
}
r[i]=Math.floor((x*50+y*50)/100);
r[i]=r[i].toString(16);
if(r[i].length==1){
r[i]="0"+r[i];
}
}
return ("#"+r[0]+r[1]+r[2]);
}
var arrcloze=new Array();
function getFocus(){
try{
document.getElementById("answer1").focus();
}
catch(e){
}
}
function cloze(_ad,_ae){
var _af="";
var _b0=new Array("");
var _b1=0;
var IE;
if(navigator.appName=="Microsoft Internet Explorer"){
IE=true;
}else{
IE=false;
}
parseText(_ae);
function parseText(_b3){
document.write("<form action=\"javascript:void(0);\" autocomplete=\"off\">");
var i;
for(i=0;i<_b3.length;i++){
var _b5=_b3.substr(i,1);
if(_b5=="["){
i+=startRecordingCloze(_b3.substring(i+1,_b3.length));
}else{
if(_b5=="{"){
i+=startRecordingOptions(_b3.substring(i+1,_b3.length));
}else{
document.write(_b5);
}
}
}
if(IE){
document.write("<input type=\"submit\" style=\"width:0px; height:0px;\">");
}
document.write("</form>");
outputText();
}
function startRecordingCloze(_b6){
_b1++;
var i=0;
var _b8=0;
var _b9=0;
var _ba="";
while(true){
var _bb=_b6.substr(i++,1);
if(_bb=="]"){
_b8=Math.max(_b8,_b9);
_b0.push(_ba.split(","));
break;
}else{
if(_bb==","){
_b8=Math.max(_b8,_b9);
_b9=0;
}
}
_ba+=_bb;
_b9++;
}
document.write("<span class=\"cloze_table\"><img src=\"images/cloze/tick.gif\" width=\"10\" height=\"11\" style=\"position:absolute; left:0; top:-8px !important; top:0px; visibility:hidden\" id=\"image"+_b1+"\" /><span id=\"correction"+_b1+"\" class=\"rubyt\">"+(_b0[_b1])[0]+"</span><input type=\"text\" class=\"input\" size=\""+(_b8+1)+"\" id=\"answer"+_b1+"\" onchange=\"arrcloze["+_ad+"].checkAnswer(this, false); try { document.getElementById('answer"+(_b1+1)+"').focus(); } catch(e) {}\" maxlength=\""+(_b8+3)+"\" value=\"\" /></span> ");
return _ba.length+1;
}
function startRecordingOptions(_bc){
_b1++;
var i=0;
var j;
var _bf=0;
var _c0=false;
var _c1="";
while(true){
var _c2=_bc.substr(i++,1);
if(_c2=="}"){
_b0.push(_c1.split(","));
break;
}else{
if(_c2==","&&!_c0){
_bf++;
}else{
if(_c2=="#"){
_c0=true;
}
}
}
if(_c2!="#"){
_c1+=_c2;
}
}
document.writeln("<select class=\"input\" id=\"answer"+_b1+"\" onchange=\"arrcloze["+_ad+"].checkSelect(this,this.options[this.selectedIndex].value,'"+(_b0[_b1])[_bf]+"'); try { document.getElementById('answer"+(_b1+1)+"').focus(); } catch(e) {}\" /> ");
document.writeln("<option value=\"---\">---</option>");
for(j=0;j<_b0[_b1].length;j++){
document.writeln("<option value='"+(_b0[_b1])[j]+"'>"+(_b0[_b1])[j]+"</option>");
}
document.writeln("</select> <img src=\"images/cloze/tick.gif\" width=\"10\" height=\"11\" style=\"display:none\" id=\"imagetick"+_b1+"\" /><img src=\"images/cloze/cross.gif\" width=\"10\" height=\"11\" style=\"display:none\" id=\"imagecross"+_b1+"\" /><img src=\"images/cloze/spacer.gif\" width=\"10\" height=\"11\" style=\"display:inline\" id=\"imagespacer"+_b1+"\" />");
return _c1.length+2;
}
function appendString(_c3){
_af+=_c3;
}
function outputText(){
}
function getObj(_c4){
return document.getElementById(_c4);
}
function checkAnswer(obj,_c6){
var id=obj.id;
id=id.substring(6,id.length);
var _c8=obj.value;
_c8=_c8.replace(/ /g,"");
_c8=_c8.toLowerCase();
var i;
for(i=0;i<_b0[id].length;i++){
if(_c8==(_b0[id])[i]){
var _ca=getObj("image"+id);
_ca.style.visibility="visible";
return true;
}
}
getObj("correction"+id).style.visibility="visible";
obj.style.textDecoration="line-through";
obj.disabled=true;
obj.contentEditable=false;
}
function checkSelect(obj,_cc,_cd){
var id=obj.id;
id=id.substring(6,id.length);
var i;
var _d0=getObj("imagetick"+id);
var _d1=getObj("imagecross"+id);
var _d2=getObj("imagespacer"+id);
if(_cd==_cc){
_d1.style.display="none";
_d2.style.display="none";
_d0.style.display="inline";
}else{
if(_cc!="---"){
_d0.style.display="none";
_d2.style.display="none";
_d1.style.display="inline";
}else{
_d0.style.display="none";
_d1.style.display="none";
_d2.style.display="inline";
}
}
}
this.checkAnswer=checkAnswer;
this.checkSelect=checkSelect;
}
function checkClozAnswer(obj,_d4){
var ax=obj.getAttribute("ax")?obj.getAttribute("ax"):"";
var _d6=ax.split(",");
var id=obj.id;
id=id.substring(6,id.length);
var _d8="tick"+id;
var _d9=obj.value;
_d9=trim(_d9);
_d9=_d9.toLowerCase();
var i;
for(i=0;i<_d6.length;i++){
if(_d9==trim(_d6[i]).toLowerCase()){
var _db=document.getElementById(_d8);
_db.style.display="inline";
obj.disabled=true;
obj.contentEditable=false;
return true;
}
}
document.getElementById("correct"+id).style.visibility="visible";
document.getElementById("correct"+id).style.display="inline";
obj.style.textDecoration="line-through";
obj.disabled=true;
obj.contentEditable=false;
return false;
}
function checkSelectAnswer(obj,_dd,_de){
var id=obj.id;
id=id.substring(6,id.length);
var i;
var _e1=getObj("imagetick"+id);
var _e2=getObj("imagecross"+id);
var _e3=getObj("imagespacer"+id);
_de=trim(_de);
_dd=trim(_dd);
if(_de==_dd){
_e2.style.display="none";
_e3.style.display="none";
_e1.style.display="inline";
obj.disabled=true;
}else{
if(_dd!="---"){
_e1.style.display="none";
_e3.style.display="none";
_e2.style.display="inline";
document.getElementById("correct"+id).style.visibility="visible";
document.getElementById("correct"+id).style.display="inline";
obj.disabled=true;
}else{
_e1.style.display="none";
_e2.style.display="none";
_e3.style.display="inline";
}
}
}
function trim(str,_e5){
return ltrim(rtrim(str,_e5),_e5);
}
function ltrim(str,_e7){
_e7=_e7||"\\s";
return str.replace(new RegExp("^["+_e7+"]+","g"),"");
}
function rtrim(str,_e9){
_e9=_e9||"\\s";
return str.replace(new RegExp("["+_e9+"]+$","g"),"");
}
function focusNext(obj,_eb){
var _ec=$(obj).form;
var _ed=$(_eb).form;
if(_ec.getAttribute("id")==_ed.getAttribute("id")){
$(_eb).focus();
}
}
function handleEnter(_ee,_ef,_f0){
var _f1=_ef.keyCode?_ef.keyCode:_ef.which?_ef.which:_ef.charCode;
if(_f1==13){
var i;
for(i=0;i<_ee.form.elements.length;i++){
if(_ee==_ee.form.elements[i]){
break;
}
}
i=(i+1)%_ee.form.elements.length;
focusNext(_ee,_f0);
return false;
}else{
return true;
}
}
function openCecil(){
if(typeof (myWindow)=="undefined"||myWindow.closed){
var _f3=screen.availWidth*0.9;
var _f4=screen.availHeight*0.7;
myWindow=window.open("http://cecil.auckland.ac.nz/","cecil","scrollbars=yes,toolbar=yes,status=yes,location=yes,menubar=yes,resizable=yes,top=30,left=30,width="+_f3+",height="+_f4+"");
}
myWindow.focus();
}
function goback(){
window.history.go(-1);
}
function showPNG(){
for(var i=0;i<document.images.length;i++){
var img=document.images[i];
var _f7=img.src.toUpperCase();
if(_f7.substring(_f7.length-3,_f7.length)=="PNG"){
img.style.visibility="visible";
}
}
}
function MM_openBrWindow(_f8,_f9,_fa){
window.open(_f8,_f9,_fa);
}
var objBrowse=navigator.appName;
var bodyScrollTop=0;
function showDiv(_fb,_fc,w,h,_ff){
hideDiv();
if(_ff==undefined){
_ff="";
}
var _100=document.createElement("div");
_100.id="popupmessage";
if(_fb!=""){
_100.className="mediaFile";
}else{
_100.className="mediaFileWhite";
}
if(_ff!=""){
cacXpos=(xpos-w-50)>10?(xpos-w-50):10;
}else{
cacXpos=(xpos-w/1.7)>10?(xpos-w/1.7):10;
}
if(_ff!=""&&_fb!=""){
cacYpos=(ypos-h/2-90)>10?(ypos-h/2-90):10;
}else{
if(_fb==""){
cacYpos=(ypos-50)>10?(ypos-50):10;
}else{
cacYpos=(ypos-h-90)>10?(ypos-h-90):10;
}
}
if(_fc=="mp3"){
cacYpos=(ypos-90)>10?(ypos-90):10;
}
if(cacYpos<bodyScrollTop){
cacYpos=bodyScrollTop;
}
_100.style.cssText="left: "+(cacXpos)+"px; top: "+(cacYpos)+"px; width: "+w+"px;";
var html="<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin-top:5px; margin-bottom:5px;\"><tr><td width=\"100%\" style=\"background-image:url(player/drag_bar.gif); background-repeat: repeat-x; background-position: 3px; border:1px solid  #757575;\" title=\"click and drag\"><img src=\"images/space.gif\" width=\"1\" height=\"1\" /></td><td style=\"padding-left:2px;\"><img src=\"player/close_small.png\" width=\"14\" height=\"14\" onclick=\"Javascript:hideDiv();\" title=\"close\" style=\"z-index:10001;\"/></td></tr></table>";
if(_fc=="wmv"){
html+="<EMBED ID=\"Player\" standby=\"Loading Microsoft Windows Media Player components...\" WIDTH=\""+(w)+"\" HEIGHT=\""+(h+47)+"\" CONTROLLER=\"TRUE\" SRC=\""+_fb+"\"  type=\"application/x-mplayer\" TARGET=\"myself\" BGCOLOR=\"#000000\" AnimationAtStart=\"true\" PLUGINSPAGE=\"http://www.microsoft.com/Windows/MediaPlayer/\" standby=\"Loading Microsoft Windows Media Player components...\" autostart=\"true\"></EMBED>";
}else{
if(_fc=="mp3"){
html+="<p id=\"Player\" class=\"mediaplugin\"><embed src=\"images/mediaplayer.swf\" width=\""+(w)+"\" height=\"20\" allowscriptaccess=\"always\" allowfullscreen=\"true\" flashvars=\"autostart=true&width=320&height=20&file="+_fb+"\"/></p>";
}else{
if(_fc=="mov"||_fc=="qtl"||_fc=="mp4"){
html+="<EMBED ID=\"Player\" WIDTH=\""+(w+2)+"\" HEIGHT=\""+(h+18)+"\" CONTROLLER=\"TRUE\" SRC=\""+_fb+"\"  type=\"video/quicktime\" TARGET=\"myself\" BGCOLOR=\"#000000\" PLUGINSPAGE=\"http://www.apple.com/quicktime/download/\" autostart=\"true\"></EMBED>";
}else{
if(_fc=="mpg"||_fc=="mpeg"){
html+="<p id=\"Player\" class=\"mediaplugin\"><object width=\""+(w+2)+"\" height=\""+(h+47)+"\"><param name=\"src\" value=\""+_fb+"\"><param name=\"controller\" value=\"true\"> <param name=\"autoplay\" value=\"true\"><embed src=\""+_fb+"\" width=\""+(w)+"\" height=\""+(h+47)+"\"    controller=\"true\" autoplay=\"true\"> </embed> </object></p>";
}else{
if(_fc=="avi"){
html+="<p id=\"Player\" class=\"mediaplugin\"><object width=\""+(w+2)+"\" height=\""+(h+47)+"\"> <param name=\"src\" value=\""+_fb+"\"> <param name=\"controller\" value=\"true\"> <param name=\"autoplay\" value=\"true\"> <embed src=\""+_fb+"\" width=\""+(w)+"\" height=\""+(h+47)+"\" controller=\"true\" autoplay=\"true\"> </embed></object></p>";
}else{
if(_fc=="swf"){
html+="<p id=\"Player\" class=\"mediaplugin swf\"><object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"          codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\""+(w+2)+"\" height=\""+(h+2)+"\" id=\"mp3player\"> <param name=\"movie\" value=\""+_fb+"\" /> <param name=\"quality\" value=\"high\" /> <param name=\"AllowScriptAccess\" value=\"never\" /> <embed src=\""+_fb+"\" quality=\"high\" width=\""+(w+2)+"\" height=\""+(h+2)+"\" name=\"flashfilter\" AllowScriptAccess=\"never\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed> </object></p>";
}else{
if(_fc=="flv"){
_fb="../"+_fb;
html+="<object id=\"Player\" class=\"mediaplugin flv\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"\tcodebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" \twidth=\""+(w+2)+"\" height=\""+(h+20)+"\" id=\"flvplayer\"> <param name=\"movie\" value=\"images/mediaplayer.swf?file="+_fb+"\" /><param name=\"quality\" value=\"high\" />\t<param name=\"bgcolor\" value=\"#FFFFFF\" /><param name=\"allowfullscreen\" value=\"true\"><param name=\"flashvars\" value=\"waitForPlay=yes&autostart=true\" /><embed  src=\"images/mediaplayer.swf?file="+_fb+"\" quality=\"high\" bgcolor=\"#FFFFFF\" width=\""+(w+2)+"\" height=\""+(h+20)+"\"name=\"flvplayer\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" flashvars=\"waitForPlay=yes&autostart=true\"  pluginspage=\"http://www.macromedia.com/go/getflashplayer\"></embed></object>";
}else{
if(_fc=="youtube"){
if(_fb.indexOf("http://www.youtube.com/watch?v=")>-1){
_fb=_fb.replace("http://www.youtube.com/watch?v=","");
}
if(_fb.indexOf("http://www.youtube.com/v/")<0){
_fb="http://www.youtube.com/v/"+_fb;
}
html+="<div id=\"Player\" class=\"mediaplugin\"><object width=\""+(w+2)+"\" height=\""+(h+20)+"\"><param name=\"movie\" value=\""+_fb+"&autoplay=1\" /><param name=\"wmode\" value=\"transparent\" /><embed src=\""+_fb+"&autoplay=1\" type=\"application/x-shockwave-flash\" wmode=\"transparent\" type=\"application/x-shockwave-flash\" width=\""+(w+2)+"\" height=\""+(h+20)+"\"></embed></object></div>";
}else{
if(_fc==""){
html+="<p id=\"Player\" class=\"mediaplugin\"></p>";
}else{
alert("media file type not supported");
return 0;
}
}
}
}
}
}
}
}
}
_100.innerHTML=html+_ff;
document.body.appendChild(_100);
new Draggable("popupmessage");
}
function hideDiv(){
var _102=document.getElementById("popupmessage");
if(_102){
try{
document.getElementById("Player").Stop();
}
catch(e){
}
try{
document.getElementById("Player").style.visibility="hidden";
_102.removeChild(document.getElementById("Player"));
_102.parentNode.removeChild(_102);
}
catch(e){
}
}
}
function updateCoords1(e){
xpos=Event.pointerX(e);
ypos=Event.pointerY(e);
}
function updateCoords(e){
var _105=document.viewport.getScrollOffsets();
bodyScrollTop=_105[1];
xpos=Event.pointerX(e);
ypos=Event.pointerY(e);
}
function openRollover(id,_107){
document.getElementById(_107).innerHTML=document.getElementById(id).innerHTML;
}
function hideRolloverMessage(_108){
document.getElementById(_108).innerHTML="";
}
function swapImg(_109,i){
if(i){
_109.src="icons/close_icon_over.gif";
}else{
_109.src="icons/close_icon.gif";
}
}
function clearChecks(){
var i=0;
var _10c=document.forms[0].elements;
while(true){
try{
_10c[i++].checked=false;
}
catch(e){
break;
}
}
}
function checkAnswer(obj){
eval("document.getElementById(\"a"+obj.name+"\")").style.display="block";
eval("document.getElementById(\"a"+obj.name+"\")").innerHTML=eval("document.getElementById(\"s"+obj.id+"\")").innerHTML;
try{
var _10e=inTab(obj.id);
if($(_10e).up(".scroller")){
parentDiv=$(_10e).up(".scroller");
var _10f=parentDiv.getHeight();
var _110=_10f+$("a"+obj.name).getHeight();
my_glider.moveTo(my_glider.current.id,my_glider.scroller,{duration:my_glider.options.duration});
}
}
catch(e){
}
}
function checkAnswerNew(obj){
try{
var _112=obj.id.substr(0,(obj.id.length-1));
for(var i=1;i<9;i++){
var _114="s"+_112+String(i);
$(_114).hide();
}
}
catch(e){
}
$("s"+obj.id).show();
try{
var _115=inTab(obj.id);
if($(_115).up(".scroller")){
parentDiv=$(_115).up(".scroller");
var _116=parentDiv.getHeight();
var _117=_116+$("a"+obj.name).getHeight();
my_glider.moveTo(my_glider.current.id,my_glider.scroller,{duration:my_glider.options.duration});
}
}
catch(e){
}
}
window.onload=function(){
Nifty("div#menu a","small transparent top");
Nifty("ul#intro li","same-height");
Nifty("div.date");
Nifty("div#content,div#side","same-height");
Nifty("div.comments div");
Nifty("div#footer");
Nifty("div#container","bottom");
};
var elmIframeDiv;
function hidePopUpDiv(){
var _118=document.getElementById("popupDivMessage");
if(_118){
_118.parentNode.removeChild(_118);
}
if(isMSIE){
try{
elmIframeDiv.style.display="none";
}
catch(e){
}
}
}
function showPopUpDiv(_119,args){
var w=200;
var html="";
var _11d=0;
var left=0;
if(args.width){
w=args.width;
}
if(args.hint){
html=args.hint;
}
if(args.lower){
_11d=args.lower;
}
if(args.left){
left=args.left;
}
updateCoordsPopUpDiv(_119,w);
hidePopUpDiv();
if(html==""){
return;
}
var _11f=document.createElement("div");
_11f.id="popupDivMessage";
_11f.className="popup";
_11f.zIndex=1000;
_11f.innerHTML=html;
if(isMSIE){
xpos=xpos-w/2;
}
_11f.style.cssText="left:"+(xpos)+"px; width: "+w+"px; font-style:italic;";
document.body.appendChild(_11f);
if(_11d){
_11f.style.top=ypos+yoffset+10+"px";
}else{
_11f.style.top=ypos+yoffset-_11f.offsetHeight-20+"px";
}
if(ypos<(parseInt(_11f.top)+_11f.offsetHeight)){
}
if(left){
_11f.style.left=(_11f.style.left.slice(0,-2))/1-w+"px";
}
if(isMSIE){
elmIframeDiv=document.createElement("iframe");
elmIframeDiv.style.left=_11f.style.left;
elmIframeDiv.style.top=_11f.style.top;
elmIframeDiv.style.width=_11f.style.width;
}
}
function updateCoordsPopUpDiv(e,_121){
var st=Math.max(document.body.scrollTop,document.documentElement.scrollTop);
var _123=Math.max(document.body.clientWidth,document.documentElement.clientWidth)-20;
isMSIE=0;
if(objBrowse=="Microsoft Internet Explorer"){
isMSIE=1;
xpos=e.clientX;
ypos=e.clientY+st-10;
targ=e.srcElement.parentElement;
if(e.srcElement.offsetHeight>20){
yoffset=e.srcElement.offsetHeight-20;
}else{
yoffset=e.srcElement.offsetHeight;
}
}else{
var _124=Event.pointerX(e);
var _125=Position.cumulativeOffset(e.currentTarget);
xpos=Math.min(_125[0],_124);
ypos=_125[1];
if(e.currentTarget.offsetHeight>20){
yoffset=e.currentTarget.offsetHeight-20;
}else{
yoffset=e.currentTarget.offsetHeight;
}
}
}
function getMaxWidth(_126){
var node=_126.firstChild;
var _128=0;
while(node){
var _129=node.nextSibling;
try{
tmpWidth=node.getAttribute("width")?node.getAttribute("width"):parseInt(node.clientHeight);
}
catch(e){
}
if(parseInt(tmpWidth)>_128){
_128=tmpWidth;
}
node=_129;
}
return _128;
}
function showGlossaryDiv(evt,_12b){
var w=300;
var html="";
var _12e=0;
var left=0;
var _130=0;
var _131=0;
html=$(_12b)?$(_12b).innerHTML:"";
updateCoordsPopUpDiv(evt);
hidePopUpDiv();
if(html==""){
return;
}
var _132=document.createElement("div");
_132.id="popupDivMessage";
_132.className="popup";
_132.zIndex=1000;
_132.innerHTML=html;
if(isMSIE){
xpos=xpos-w/2;
}
_132.style.cssText="left:"+(xpos)+"px; width: "+w+"px; font-style:italic;";
document.body.appendChild(_132);
if(_12e){
_132.style.top=ypos+yoffset+10+"px";
}else{
_132.style.top=ypos+yoffset-_132.offsetHeight-20+"px";
}
if(_131){
_132.style.top=ypos+yoffset-_132.offsetHeight+20+"px";
}
if(ypos<(parseInt(_132.top)+_132.offsetHeight)){
}
if(left){
_132.style.left=(_132.style.left.slice(0,-2))/1-w+"px";
}
if(_130){
if(isMSIE){
_132.style.left=(_132.style.right.slice(0,-2))/1+1.5*w+10+"px";
}else{
_132.style.left=(_132.style.right.slice(0,-2))/1+w+10+"px";
}
}
if(isMSIE){
elmIframeDiv=document.createElement("iframe");
elmIframeDiv.style.left=_132.style.left;
elmIframeDiv.style.top=_132.style.top;
elmIframeDiv.style.width=_132.style.width;
}
}
function showToolTip(e,text){
if(document.all){
e=event;
}
var obj=document.getElementById("bubble_tooltip");
var obj2=document.getElementById("bubble_tooltip_content");
obj2.innerHTML=text;
obj.style.display="block";
var st=Math.max(document.body.scrollTop,document.documentElement.scrollTop);
var _138=e.clientX-100;
if(_138<0){
_138=0;
}
obj.style.left=_138+"px";
obj.style.top=e.clientY-obj.offsetHeight-1+st+"px";
return false;
}
function hideToolTip(){
document.getElementById("bubble_tooltip").style.display="none";
}
function imgDecorate(){
var _139=document.getElementsByTagName("img");
var _13a=false;
if($$(".accordion_content")||$$(".scrollerContainer")){
_13a=true;
}
for(var i=0;i<_139.length;i++){
var img=_139[i];
var _13d=img.src.toUpperCase();
var _13e="";
var _13f=0;
var _140=0;
var _141=0;
var _142=0;
var _143="",_144="";
var _145="";
var _146=false;
var _147="position:relative;";
var _148="";
var _149="";
var _14a="0";
var _14b=0;
var _14c="";
var _14d="6px";
if(img.title.indexOf("shadow")>-1){
var _14e=(img.id)?"id='"+img.id+"' ":"";
var _14f=(img.title)?"class='"+img.title+" item' ":"";
img.style.width="";
img.style.height="";
var _150=img.style.cssText+"zoom:1;min-height:1px;";
_140=parseInt(img.width);
_141=parseInt(img.height);
if(img.border){
_14a=img.border;
}
if(_140==0||_141==0){
_143=img.title.replace("shadow","");
if(_143.indexOf("x")>-1){
_144=_143.split("x");
_140=_144[0]/1;
_141=parseInt(_144[1]);
}
}
if(img.align=="left"){
_145="left";
_149="margin: 6px 6px 0 0;";
}else{
if(img.align=="right"){
_145="right";
_149="margin: 6px 0 0 6px;";
}else{
if(img.align=="middle"){
_145="center";
_149="margin:6px auto;";
}
}
}
try{
if(img.parentNode.href){
_150="cursor:hand;"+_150;
}
}
catch(e){
}
var _151=img.getAttribute("alt");
if(_151==""){
_14c="overflow:hidden;";
_14d="0";
_14b=_141;
}else{
_14b=_141+6;
}
newDiv=document.createElement("div");
var _152="margin-top:5px;";
var _13e="";
if(img.align=="left"){
_152+="margin-right:5px";
}else{
if(img.align=="right"){
_152+="margin-left:10px";
}
}
if(_14f.indexOf("captionTop")>-1){
var _153=["<div><p>","<span id=\"captionTop\">",_151,"</span>","<img class=\"noPngFix\" src=\"",img.src,"\" height=\"",_141,"px\" width=\"",_140,"px\">","</p>","</div>"].join("");
}else{
if(_14f.indexOf("pinImg")>-1){
_13e="<span class=\"pin\"></span>";
}else{
if(_14f.indexOf("tapeImg")>-1){
_13e="<span class=\"tape\"></span>";
}else{
if(_14f.indexOf("paper_clipImg")>-1){
_13e="<span class=\"paper_clip\"></span>";
}else{
if(_14f.indexOf("ovalFramed")>-1&&_140>0&&_141>0){
if(Prototype.Browser.IE){
_13e="<img class=\"round_corner noPngFix\" src=\"images/circle.png\" style=\"width:"+(_140+6)+"px;height:"+(_141+6)+"px;\"></img>";
}else{
_13e="<img class=\"round_corner noPngFix\" src=\"images/circle.png\" width="+(_140)+" height="+(_141)+"\" style=\"top:4px;left:4px;width:"+(_140+4)+"px;height:"+(_141+4)+"px;\"></img>";
}
}else{
if(_14f.indexOf("cutCorner")>-1&&_140>0&&_141>0){
_13e="<img class=\"round_corner noPngFix\" src=\"images/cut-corner.png\" style=\"top: 1px;left: 1px;width:"+(_140+8)+"px;height:"+(_141+8)+"px;\" />";
}else{
if(_14f.indexOf("stampPattern")>-1&&_140>0&&_141>0){
_13e="<img class=\"round_corner noPngFix\" src=\"images/stamp-pattern.png\" width=\""+(_140+4)+"\" height="+(_141+4)+" style=\"top:4px;left:4px;width:"+(_140+4)+"px;height:"+(_141+4)+"px;\" />";
}else{
if(_14f.indexOf("roundCorner")>-1&&_140>0&&_141>0){
_13e="<img src=\"images/album_mask.png\" style=\"position:absolute;top:2px;left:4px;width:"+(_140+5)+"px;height:"+(_141+5)+"px;\" />";
}
}
}
}
}
}
}
if(_145!="center"){
_148=["<div align=\"",_145,"\" style=\"",_147,";",_149,"float:",_145,"\">"].join("");
}else{
_148=["<div align=\"center\" style=\"",_147,";",_149,"; clear:both;\">"].join("");
}
if(_146){
}
var _153=[_148,"<div style=\"position:relative;margin:auto 0; width:",(_140+19),"px\">","<img src=\"images/white.gif\" width=\"",(_140+11),"\" height=\"6\" style=\"margin-right:6px; border-bottom:none;border-top:1px solid #999; border-left:1px solid #999; border-right:1px solid #999; border-bottom:none\" /><br />\n","<img src=\"images/white.gif\" width=\"6\" height=\"",_14b,"\" align=\"top\" style=\"border-top:none; border-right:none; border-bottom:none;border-left:1px solid #999\" />",_13e,"<img class=\"noPngFix\" src=\"",img.src,"\" width=\"",(_140),"\" height=\"",(_141),"\" border=\"0\" style=\"padding:0 12px ",_14d," 0; background:url(images/shadowAlpha1.png) no-repeat top right\" /><br />\n","<div class=\"imgCaption\" style=\"width:",(_140),"px;",_14c,"\"><img src=\"images/white.gif\" height=\"1\" width=\"1\" style=\"display:none\" />",_151,"</div>\n","<div class=\"captionbottom\" style=\"width:",(_140+13),"px\"><img src=\"images/white.gif\" height=\"1\" width=\"1\" style=\"display:none\" /></div>","</div>","</div>"].join("");
}
newDiv.innerHTML=_153;
if(img.parentNode){
img.parentNode.replaceChild(newDiv,img);
}else{
img.outerHTML=_153;
}
}else{
if(img.align=="center"){
var _14e=(img.id)?"id='"+img.id+"' ":"";
var _14f=(img.title)?"class='"+img.title+" item' ":"";
var _150=img.style.cssText;
var _150="";
try{
if(img.parentNode.href){
_150="cursor:hand;"+_150;
}
}
catch(e){
}
var _151=img.getAttribute("alt");
if(img.getAttribute("width")){
_140=img.getAttribute("width");
}else{
var _154=img.title.split(" ");
for(var i=0,m=_154.length;i<m;i++){
if(_154[i].indexOf("shadow")>-1){
_143=_154[i].replace("shadow","");
if(_143.indexOf("x")>-1){
_144=_143.split("x");
_140=_144[0];
_142=parseInt(_144[1]);
}
}
}
}
if(img.getAttribute("height")){
_141=img.getAttribute("height");
}else{
try{
_141=_142;
}
catch(e){
}
}
newDiv=document.createElement("center");
newDiv.style.cssText=_150+"text-align:center;";
var _153=["<img class=\"shadowImg\" src=\"",img.src,"\" ",_14f,_14e," height=\"",_141,"px\" width=\"",_140,"px\">"].join("");
newDiv.innerHTML=_153;
img.parentNode.replaceChild(newDiv,img);
}
}
}
}
function noPositionStyle(_156){
var _157=false;
var _158=_156.parentNode;
while(_158){
try{
if(_158.hasClassName("accordion_content")||_158.hasClassName("scrollerContainer")){
_157=true;
break;
}
}
catch(e){
}
_158=_158.parentNode;
}
return _157;
}
function fixTabHeight(){
try{
if($("gliderNavigation")){
my_glider.moveTo(my_glider.options.initialSection,my_glider.scroller,{duration:my_glider.options.duration});
}
}
catch(e){
}
}
function onLoadImgDecoration(img){
var _15a=false;
var _15b=img.src.toUpperCase();
var _15c="";
var _15d=0;
var _15e=0;
var _15f=0;
var _160=0;
var _161="",_162="";
var _163="";
var _164=false;
var _165="position:relative;";
var _166="";
var _167="";
var _168="0";
var _169=0;
var _16a="";
var _16b="6px";
var _16c=0.3,_16d=0.5,_16e;
var re0=/mce_t/g;
var re1=/\\'/g;
if(img.getAttribute("class")=="reflection"){
var _171=img.wrap(new Element("div"));
_171.style.position="relative";
var dim=img.getDimensions();
var _173=Math.round(dim.height*_16c);
var _174=img.hspace?img.hspace:0;
_171.style.paddingBottom=_173+"px";
$R(1,_173).each(function(y){
var div=_171.appendChild(new Element("div"));
div.setStyle({width:dim.width+"px",height:"1px",position:"absolute",top:(dim.height+y-1)+"px",left:_174+"px",backgroundImage:"url("+img.src+")",backgroundPosition:"0 "+(y-dim.height)+"px",backgroundRepeat:"no-repeat",opacity:(1-(y/_173))*_16d});
});
_16e=document.createElement("div");
_16e.style.cssText="clear:both;";
img.parentNode.insertBefore(_16e,img.nextSibling);
}
if(img.title.indexOf("shadow")>-1){
var _177=(img.id)?"id='"+img.id+"' ":"";
var _178=(img.title)?"class='"+img.title+" item' ":"";
img.style.width="";
img.style.height="";
var _179=img.style.cssText+"zoom:1;min-height:1px;";
_15e=parseInt(img.width);
_15f=parseInt(img.height);
if(img.border){
_168=img.border;
}
if(_15e==0||_15f==0){
_161=img.title.replace("shadow","");
if(_161.indexOf("x")>-1){
_162=_161.split("x");
_15e=_162[0]/1;
_15f=parseInt(_162[1]);
}
}
if(img.align=="left"){
_163="left";
_167="margin: 6px 6px 0 0;";
}else{
if(img.align=="right"){
_163="right";
_167="margin: 6px 0 0 6px;";
}else{
if(img.align=="middle"){
_163="center";
_167="margin:6px auto;";
}
}
}
try{
if(img.parentNode.href){
_179="cursor:hand;"+_179;
}
}
catch(e){
}
var _17a=img.getAttribute("alt").replace(re0,"");
_17a=_17a.replace(re1,"\"");
if(_17a==""){
_16a="overflow:hidden;";
_16b="0";
_169=_15f;
}else{
_169=_15f+6;
}
newDiv=document.createElement("div");
var _17b="margin-top:5px;";
var _15c="";
if(img.align=="left"){
_17b+="margin-right:5px";
}else{
if(img.align=="right"){
_17b+="margin-left:10px";
}
}
if(_178.indexOf("captionTop")>-1){
var _17c=["<div><p>","<span id=\"captionTop\">",_17a,"</span>","<img class=\"noPngFix\" src=\"",img.src,"\" height=\"",_15f,"px\" width=\"",_15e,"px\">","</p>","</div>"].join("");
}else{
if(_178.indexOf("pinImg")>-1){
_15c="<span class=\"pin\"></span>";
}else{
if(_178.indexOf("tapeImg")>-1){
_15c="<span class=\"tape\"></span>";
}else{
if(_178.indexOf("paper_clipImg")>-1){
_15c="<span class=\"paper_clip\"></span>";
}else{
if(_178.indexOf("ovalFramed")>-1&&_15e>0&&_15f>0){
if(Prototype.Browser.IE){
_15c="<img class=\"round_corner noPngFix\" src=\"images/circle.png\" style=\"width:"+(_15e+6)+"px;height:"+(_15f+6)+"px;\"></img>";
}else{
_15c="<img class=\"round_corner noPngFix\" src=\"images/circle.png\" width="+(_15e)+" height="+(_15f)+"\" style=\"top:4px;left:4px;width:"+(_15e+4)+"px;height:"+(_15f+4)+"px;\"></img>";
}
}else{
if(_178.indexOf("cutCorner")>-1&&_15e>0&&_15f>0){
_15c="<img class=\"round_corner noPngFix\" src=\"images/cut-corner.png\" style=\"top: 1px;left: 1px;width:"+(_15e+8)+"px;height:"+(_15f+8)+"px;\" />";
}else{
if(_178.indexOf("stampPattern")>-1&&_15e>0&&_15f>0){
_15c="<img class=\"round_corner noPngFix\" src=\"images/stamp-pattern.png\" width=\""+(_15e+4)+"\" height="+(_15f+4)+" style=\"top:4px;left:4px;width:"+(_15e+4)+"px;height:"+(_15f+4)+"px;\" />";
}else{
if(_178.indexOf("roundCorner")>-1&&_15e>0&&_15f>0){
_15c="<img src=\"images/album_mask.png\" style=\"position:absolute;top:2px;left:4px;width:"+(_15e+5)+"px;height:"+(_15f+5)+"px;\" />";
}
}
}
}
}
}
}
if(_163!="center"){
_166=["<div align=\"",_163,"\" style=\"",_165,";",_167,"float:",_163,"\">"].join("");
}else{
_166=["<div align=\"center\" style=\"",_165,";",_167,"; clear:both;\">"].join("");
}
if(_164){
}
var _17c=[_166,"<div style=\"position:relative;margin:auto 0; width:",(_15e+19),"px\">","<img src=\"images/white.gif\" width=\"",(_15e+11),"\" height=\"6\" style=\"margin-right:6px; border-bottom:none;border-top:1px solid #999; border-left:1px solid #999; border-right:1px solid #999; border-bottom:none\" /><br />\n","<img src=\"images/white.gif\" width=\"6\" height=\"",_169,"\" align=\"top\" style=\"border-top:none; border-right:none; border-bottom:none;border-left:1px solid #999\" />",_15c,"<img class=\"noPngFix\" src=\"",img.src,"\" width=\"",(_15e),"\" height=\"",(_15f),"\" border=\"0\" style=\"padding:0 12px ",_16b," 0; background:url(images/shadowAlpha1.png) no-repeat top right\" /><br />\n","<div class=\"imgCaption\" style=\"width:",(_15e),"px;",_16a,"\"><img src=\"images/white.gif\" height=\"1\" width=\"1\" style=\"display:none\" />",_17a,"</div>\n","<div class=\"captionbottom\" style=\"width:",(_15e+13),"px\"><img src=\"images/white.gif\" height=\"1\" width=\"1\" style=\"display:none\" /></div>","</div>","</div>"].join("");
}
newDiv.innerHTML=_17c;
if(img.parentNode){
img.parentNode.replaceChild(newDiv,img);
}else{
img.outerHTML=_17c;
}
}else{
if(img.align=="center"){
var _177=(img.id)?"id='"+img.id+"' ":"";
var _178=(img.title)?"class='"+img.title+" item' ":"";
var _179=img.style.cssText;
var _179="";
try{
if(img.parentNode.href){
_179="cursor:hand;"+_179;
}
}
catch(e){
}
var _17a=img.getAttribute("alt");
if(img.getAttribute("width")){
_15e=img.getAttribute("width");
}else{
var _17d=img.title.split(" ");
for(var i=0,m=_17d.length;i<m;i++){
if(_17d[i].indexOf("shadow")>-1){
_161=_17d[i].replace("shadow","");
if(_161.indexOf("x")>-1){
_162=_161.split("x");
_15e=_162[0];
_160=parseInt(_162[1]);
}
}
}
}
if(img.getAttribute("height")){
_15f=img.getAttribute("height");
}else{
try{
_15f=_160;
}
catch(e){
}
}
newDiv=document.createElement("center");
newDiv.style.cssText=_179+"text-align:center;";
var _17c=["<img class=\"shadowImg\" src=\"",img.src,"\" ",_178,_177," height=\"",_15f,"px\" width=\"",_15e,"px\">"].join("");
newDiv.innerHTML=_17c;
img.parentNode.replaceChild(newDiv,img);
}
}
}
Array.prototype.randomize=function(ru){
if(!ru){
this.sort(function(){
return ((Math.random()*3)|0)-1;
});
}else{
var a=[].concat(this);
var l=this.length;
var al=n=0;
for(var i=0;i<l;i++){
al=a.length;
n=Math.floor((Math.random()*al));
this[i]=a[n];
if(n==al-1){
a.pop();
}else{
a[n]=a[al-1];
a.pop();
}
}
}
};
function clickOnce(){
if(clicks==1){
return true;
}else{
return false;
}
}
function printWindow(){
bV=parseInt(navigator.appVersion);
if(bV>=4){
window.print();
}
}
function playSound1(_185){
document.getElementById("dummyspan").innerHTML="<embed src='"+_185+"' hidden=true loop=false type='video/quicktime' PLUGINSPAGE='http://www.apple.com/quicktime/download/'>";
}
function playSound(_186){
var ext=getBaseExt(_186);
var _188="<embed src=\"images/mediaplayer.swf\" width=\"1\" height=\"1\" allowscriptaccess=\"always\" allowfullscreen=\"false\" flashvars=\"autostart=true&width=1&height=1&file="+_186+"\"/>";
if(ext=="wav"){
document.getElementById("dummyspan").innerHTML="<embed src='"+_186+"' hidden=true loop=false type='video/quicktime' PLUGINSPAGE='http://www.apple.com/quicktime/download/'>";
}else{
document.getElementById("dummyspan").innerHTML=_188;
}
}
function confirmDelete(loc,_18a,_18b){
if(window.confirm("Are you sure you want to delete this ["+_18a+"] page ?")){
if(_18b==undefined||_18b!="1"){
document.getElementById("hiddenFrame").src=loc;
}else{
paras=loc.split("?");
if(paras.length>1){
updateContent(paras[0],paras[1]);
}else{
document.getElementById("hiddenFrame").src=loc;
}
}
}
}
function mySetStyle(_18c,_18d,val){
var _18f=document.getElementsByClassName(_18c);
if(_18f){
for(var i=0;i<_18f.length;i++){
if(_18f[i].nodeType==1){
_18f[i].style[_18d.camelize()]=val;
}
}
}
}
function setCookie(_191,_192){
var _193=new Date();
_193.setTime(_193.getTime()+(1000*3600*24));
document.cookie=_191+"="+_192+"; expires="+_193.toGMTString()+"; path=/";
}
function readCookie(_194){
var comp=_194+"=";
var _196=document.cookie.split(";");
for(var i=0;i<_196.length;i++){
var _198=_196[i];
while(_198.charAt(0)==" "){
_198=_198.substring(1,_198.length);
}
if(_198.indexOf(comp)==0){
return _198.substring(comp.length,_198.length);
}
}
return null;
}
function getexpirydate(_199){
var _19a;
Today=new Date();
nomilli=Date.parse(Today);
Today.setTime(nomilli+_199*24*60*60*1000);
_19a=Today.toUTCString();
return _19a;
}
function logout(u_id){
cookiestring="u_id="+escape(u_id)+";EXPIRES="+getexpirydate(-1);
document.cookie=cookiestring;
}
function handleEnter(_19c,_19d){
var _19e=_19d.keyCode?_19d.keyCode:_19d.which?_19d.which:_19d.charCode;
if(_19e==13){
var i;
for(i=0;i<_19c.form.elements.length;i++){
if(_19c==_19c.form.elements[i]){
break;
}
}
i=(i+1)%_19c.form.elements.length;
_19c.form.elements[i].focus();
return false;
}else{
return true;
}
}
function showImgDiv(bool,txt,_1a2){
if(_1a2){
}else{
_1a2=250;
}
try{
hidePopupMessage();
}
catch(e){
}
if((xpos+_1a2)>screen.width){
xpos=xpos-_1a2;
}
var _1a3=document.createElement("div");
_1a3.id="popupmessage";
_1a3.style.cssText="position: absolute; left: "+xpos+"px; top: "+(ypos+5)+"px; width:"+_1a2+"px;"+"color: black; "+"background-color: #FCFBEA; "+"color:#000000; font-family:verdana,arial,tahoma; font-size:8pt; font-weight:normal; "+"border: solid #000000 1px; text-align:left;"+"padding: 4px;";
var html=txt;
document.body.appendChild(_1a3);
_1a3.innerHTML=html;
}
function hidePopupMessage(){
var _1a5=document.getElementById("popupmessage");
if(_1a5){
_1a5.parentNode.removeChild(_1a5);
}
}
function createTarget(url,_1a7,_1a8){
if(typeof url=="undefined"){
url="";
}
if(typeof _1a7=="undefined"){
_1a7="";
}
if(typeof _1a8=="undefined"){
_1a8="width=800,height=600,scrollbars=yes";
}
window.open(url,_1a7,_1a8);
return true;
}
function verifyForm(_1a9){
for(var i=0,m=20;i<m;i++){
if(typeof (_1a9.elelments[i].required)!="undefined"){
}
if(_1a9.elelments[i].value==""){
targetElements[i].focus();
return false;
}
}
return true;
}
function displayRemoveFrameLink(){
if(self!=top){
document.getElementById("removeFrameLink").style.display="block";
}
}
function getBaseExt(_1ac){
var _1ad="";
var _1ae=_1ac.replace(/\\/g,"/").replace("..","").replace(/ /g,"_").split("/");
if(_1ae.length>0){
_1ad=_1ae[_1ae.length-1];
baseName=_1ad;
}
retStrA=_1ad.split(".");
_1ad=retStrA[retStrA.length-1];
_1ad=_1ad.toLowerCase();
return _1ad;
}
function __flash__removeCallback(_1af,name){
if(_1af){
_1af[name]=null;
}
}

