var isDOM=document.getElementById?true:false
var isOpera=isOpera5=window.opera && isDOM
var isOpera6=isOpera && window.print
var isOpera7=isOpera && document.readyState
var isMSIE=isIE=document.all && document.all.item && !isOpera
var isStrict=document.compatMode=='CSS1Compat'
var isNN=isNC=navigator.appName=="Netscape"
var isNN4=isNC4=isNN && !isDOM
var isMozilla=isNN6=isNN && isDOM
var statusCode = "";
var delayedLoadLayers=new Object();
var delayedLoadLayersOnLoad=new Object();
var delayedLoadXmlHttp=new Object();
var currentTabs=new Object();
if( (document.compatMode)&& (document.compatMode == 'CSS1Compat') &&(document.documentElement)) {
window.readScroll = document.documentElement;
} else if(document.body) {
window.readScroll = document.body;
}
else if( document.documentElement )
{
window.readScroll = document.documentElement;
}
function getWindowScrollLeft()
{
if( window.pageXOffset > 0 ) { return window.pageXOffset; }
else { return window.readScroll.scrollLeft || 0; }
}
function getWindowScrollTop()
{
if( window.pageYOffset > 0 ) { return window.pageYOffset; }
else { return window.readScroll.scrollTop || 0; }
}
function Point( x ,y ) { this.x=x; this.y=y; }
Pnt=Point.prototype
function getRect(elem )
{
// return absolute position of elem
// (Left, Top, Right, Bottom) in page
var i;
if (typeof(elem.myRect)!="undefined") return elem.myRect;
var myRect = Array(elem.offsetLeft, elem.offsetTop,
elem.offsetLeft + elem.offsetWidth-1,
elem.offsetTop + elem.offsetHeight-1)
if (!elem.offsetParent)
{
var xAdjust = (window.readScroll.clientLeft||0);
var yAdjust = (window.readScroll.clientTop||0);
for (i=0;i<4;i++) myRect[i] += (i%2)?yAdjust:xAdjust;
return myRect;
}
newRect = getRect(elem.offsetParent)
for (i=0;i<4;i++) myRect[i] = myRect[i] + newRect[i % 2];
return myRect;
}
function HTMLLayer( name,noAlert )
{
if( typeof(name)=='string' )
{
this.name=name;
this.jq=jQuery('#'+name);
this.obj=this.jq.get(0);
if( !this.obj && !noAlert)
{
alert( name );
}
}
else
{
this.jq=jQuery(name);
this.obj = name;
}
this.style = this.obj.style?this.obj.style:this.obj;
}
HTMLL=HTMLLayer.prototype
HTMLL.focus=function() { this.obj.focus(); }
HTMLL.getValue=function() { return this.jq.val(); }
HTMLL.setValue=function(val) { return this.jq.val(val);}
HTMLL.getLeft=function() { return getRect(this.obj)[0]; }
HTMLL.getWidth=function() {
return this.jq.width();
}
HTMLL.getHeight=function() {
return this.jq.height();
}
HTMLL.getTop=function() { return getRect(this.obj)[1]; }
HTMLL.write=function(text)
{
this.jq.html(text);
}
function getMouseClickPosition( e,relTo )
{
var out=new Point(0,0);
if ( !e )
{
var target = new HTMLLayer(event.target || event.srcElement);
out.x = window.event.x + getWindowScrollLeft()+target.getLeft()- relTo.getLeft();
out.y = window.event.y + getWindowScrollTop()+target.getTop()- relTo.getTop();
}
else if ( e.clientX || e.clientY )
{
out.x = e.clientX + getWindowScrollLeft() - relTo.getLeft();
out.y = e.clientY + getWindowScrollTop()- relTo.getTop();
}
else if ( e.pageX || e.pageY )
{
out.x = e.pageX - relTo.getLeft();
out.y = e.pageY - relTo.getTop();
}
return out;
};
function getObj(name)
{
this.jq=jQuery('#'+name).get(0);
this.obj=this.jq.get(0);
this.style = this.obj.style?this.obj.style:this.obj;
return this.obj;
}
function findPosX(obj)
{
var curleft = 0;
if (obj.offsetParent) {
while (obj.offsetParent) {
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (obj.x) curleft += obj.x;
return curleft;
}
function findPosY(obj)
{
var curtop = 0;
if (obj.offsetParent) {
while (obj.offsetParent) {
curtop += obj.offsetTop
obj = obj.offsetParent;
}
}
else if (obj.y) curtop += obj.y;
return curtop;
}
var hexbase="0123456789ABCDEF";
// take a decimal integer, return 2-digit hex string
function DecToHex(number) { return hexbase.charAt((number>> 4)& 0xf)+ hexbase.charAt(number& 0xf); }
// take a hex string, return decimal integer
function HexToDec(str) { return parseInt(str.toUpperCase(), 16); }
function colorFromHexCode( col )
{
if( col.substr(0,1)=="#") { col=col.substr(1); }
col=col.toUpperCase();
return new RAColor( HexToDec(col.substr(0,2)),HexToDec(col.substr(2,2)),HexToDec(col.substr(4,2)) );
}
function RAColor( red, green, blue)
{
this.r=red;
this.g=green;
this.b=blue;
}
RACol=RAColor.prototype;
RACol.setFromColorString=function(str)
{
if( str.substr(0,1)=="#")
{
str=str.substr(1);
}
this.r=HexToDec(str.substr(0,2));
this.g=HexToDec(str.substr(2,2));
this.b=HexToDec(str.substr(4,2));
}
RACol.getHex=function()
{
return "#"+DecToHex(this.r)+DecToHex(this.g)+DecToHex(this.b);
}
RACol.getColor= function(changeTo,cur,end )
{
r=Math.round( this.red+ ((changeTo.red-this.red)*cur/end) );
g=Math.round( this.green+ ((changeTo.green-this.green)*cur/end) );
b=Math.round( this.blue+ ((changeTo.blue-this.blue)*cur/end) );
return "#"+DecToHex(r)+DecToHex(g)+DecToHex(b)
}
RACol.makeDarker=function ( amount)
{
this.r=Math.max(0,Math.floor(this.r*(1-amount)));
this.g=Math.max(0,Math.floor(this.g*(1-amount)));
this.b=Math.max(0,Math.floor(this.b*(1-amount)));
}
var colors=new Object();
var colorsNotify=new Object();
//colors['colorselect1']=new RAColor("#000000");
function colorSelect(e,name,rgb)
{
var posx = 0;
var posy = 0;
if (!e) var e = window.event;
if (e.pageX || e.pageY) {
posx = e.pageX;
posy = e.pageY;
}
else if (e.clientX || e.clientY) {
posx = e.clientX + document.body.scrollLeft;
posy = e.clientY + document.body.scrollTop;
}
getObj(name+rgb);
posx-= findPosX(this.obj);
if(posx<0) { posx=0; }
else if( posx>255) { posx=255; }
getObj(name+rgb+"a");
this.style.backgroundPosition=posx+"px 0px";
(colors[name])[rgb]=posx;
getObj(name);
this.obj.value=colors[name].getColorString().substr(1);
getObj(name+"col");
this.style.backgroundColor=colors[name].getColorString();
if( colorsNotify[name]!='' )
{
eval( colorsNotify[name]+"('"+colors[name].getColorString().substr(1)+"')");
}
}
RACol.getColorString=function()
{
return "#"+DecToHex(this.r)+DecToHex(this.g)+DecToHex(this.b);
}
function setColorField(name,color)
{
colors[name].setFromColorString(color);
jQuery('#'+name).val(colors[name].getColorString().substr(1));
jQuery('#'+name+"col").css('background-color',colors[name].getColorString());
jQuery('#'+name+"ra").css('background-position',colors[name].r+"px 0px");
jQuery('#'+name+"ga").css('background-position',colors[name].g+"px 0px");
jQuery('#'+name+"ba").css('background-position',colors[name].b+"px 0px");
}
function updateColorField(name)
{
setColorField(name,jQuery('#'+name).val());
}
function colorField( name, value,notify )
{
colors[name]=colorFromHexCode(value);
colorsNotify[name]=notify;
document.write("
| ");
document.write(" | ");
document.write(" |
");
if( colors[name] )
{
jQuery('#'+name).val(colors[name].getHex().substr(1));
updateColorField(name);
}
}
function GetXmlHttpObject()
{
http_request = false;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType) {
http_request.overrideMimeType('text/xml');
}
} else if (window.ActiveXObject) { // IE
try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); }
catch (e) {
try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e) { }
}
}
return http_request;
}
function addDelayedLoadLayer( id, src ){delayedLoadLayers[id]=src;}
function setDelayedLoadLayerOnLoad(id, act) { delayedLoadLayersOnLoad[id]=act; }
function loadDelayedLoadLayer( id) {
if( typeof(delayedLoadLayers[id])=='string' ) {
var url=delayedLoadLayers[id];
alert( url);
delayedLoadXmlHttp[id]=GetXmlHttpObject();
delayedLoadXmlHttp[id].onreadystatechange=updateDelayedLayers;
delayedLoadXmlHttp[id].open("GET",url,true)
delayedLoadXmlHttp[id].send(null)
}
delayedLoadLayers[id]=null;
}
function showLayer( id ) {
if(delayedLoadLayers[id] ) { loadDelayedLoadLayer( id); }
var l=new HTMLLayer(id);
l.style.display="";
}
function updateDelayedLayers() {
for( var id in delayedLoadXmlHttp ) {
if (delayedLoadXmlHttp[id] &&(delayedLoadXmlHttp[id].readyState==4 || delayedLoadXmlHttp[id].readyState=="complete")) {
var l=new HTMLLayer(id );
l.write(delayedLoadXmlHttp[id].responseText);
delayedLoadXmlHttp[id]=false;
if( delayedLoadLayersOnLoad[id] ) {
eval(delayedLoadLayersOnLoad[id]);
delayedLoadLayersOnLoad[id]='';
}
}
}
}
function showTab(name,num) {
if( typeof( currentTabs[name] ) == 'undefined' )
{
currentTabs[name] = tabGetFirstEnabled( name );
}
if( typeof( currentTabs[name] ) != 'undefined' )
{
var buttonOld=new HTMLLayer('__'+name+"tabbutton_"+currentTabs[name]);
var frameOld=new HTMLLayer('__'+name+"tab_"+currentTabs[name]);
buttonOld.obj.className="tabbutton";
frameOld.style.display="none";
}
var buttonNew=new HTMLLayer('__'+name+"tabbutton_"+num);
var frameNew=new HTMLLayer('__'+name+"tab_"+num);
currentTabs[name]=num;
buttonNew.obj.className="tabbuttonselected";
frameNew.style.display="block";
showLayer('__'+name+"tab_"+num);
}
function tabGetFirstEnabled( name )
{
var st = '__'+name+'tabbutton_';
var stlen = st.length;
if( document.getElementsByTagName )
{
var node_list = document.getElementsByTagName('a');
for (var i = 0; i < node_list.length; i++)
{
var ele = node_list[i];
if( ele.id && ele.id.substr( 0,stlen) == st)
{
if( !( (ele.style && ele.style.display == 'none' ) || ele.display == 'none' ) )
{
return ele.id.substr( stlen );
}
}
}
}
else
{
for( var i in document.all )
{
if( i.substr( 0,stlen) == st )
{
var ele = document.all[i];
if( !( (ele.style && ele.style.display == 'none' ) || ele.display == 'none' ) )
{
return i.substr( stlen );
}
}
}
}
}
function tabDisable( name, num ) {
if( typeof( currentTabs[name] ) == 'undefined' )
{
currentTabs[name]= tabGetFirstEnabled( name );
}
var button=new HTMLLayer('__'+name+"tabbutton_"+num);
button.style.display="none";
if(currentTabs[name]==num )
{
showTab(name,tabGetFirstEnabled( name ));
}
}
function tabEnable( name, num ) {
var button=new HTMLLayer('__'+name+"tabbutton_"+num);
button.style.display="";
}
function MM_preloadImages() { /* v3.0 */ var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="