
var SKFE_HEADER_TABLE="header_table";
var SKFE_MAIN_TABLE="main_table";
var SKFE_MENU_TABLE="menu_table";
var SKFE_CONTENT_TABLE="content_table";
var SKFE_MENU_TD="skfe_menu_container";
var SKFE_MENU_LINE_DIV="skfe_menu_line";
var SKFE_COLORS=new Array(
{
 color: "#9ECD54",
 name : "Green"
},
{
 color: "#6DAFDE",
 name : "Baby Blue"
},
{
 color: "#DD6868",
 name : "Red"
},
{
 color: "#B29072",
 name : "Brown"
},
{
 color: "#FEB325",
 name : "Orange"
},
{
 color: "#7A7A7A",
 name : "Grey"
},
{
 color: "#BDAB64",
 name : "Wheat"
},
{
 color: "#9C8FB1",
 name : "Purple"
},
{
 color: "#6888B4",
 name : "Blue"
},
{
 color: "#B56C8B",
 name : "Violet"
},
{
 color: "#C2DB16",
 name : "Tucan"
}
);

var MI_HIDDEN_BCKG_COLOR="transparent";
var bSetDefaultActive=true;
var nLastActiveIndex=0;
var nDefaultActiveId=0;
function SKFEMenuItem__SetSubMenuPosition(){
var top=document.getElementById(SKFE_HEADER_TABLE).offsetHeight+28;
 var left=document.getElementById(SKFE_MAIN_TABLE).offsetLeft;
 var width=document.getElementById(SKFE_HEADER_TABLE).offsetWidth;
document.getElementById(SK_SUBMENU_CONTAINER_PREF+this.props.id).style.left=left;
 document.getElementById(SK_SUBMENU_CONTAINER_PREF+this.props.id).style.top=top;
 document.getElementById(SK_SUBMENU_CONTAINER_PREF+this.props.id).style.width=width;
}
function SKFEMenuItem__UpdateMouseOver(menu_obj_id,menuitem_obj_id){
 if(typeof SKMenus=='undefined')return;
 var oMenuItem=SKMenus[menu_obj_id].getMenuItemById(menuitem_obj_id);
 window.clearTimeout(oMenuItem.MOutTimeout);
 window.clearTimeout(oMenuItem.MOverTimeout);
 window.clearTimeout(oMenuItem.MDefaultTimeout);
bSetDefaultActive=false;
var iTimeOut=10;
oMenuItem.MOverTimeout=window.setTimeout('SKFEMenuItem__UpdateMouseOverExt('+menu_obj_id+', '+menuitem_obj_id+', '+SKFEMIColors[oMenuItem.props.id]+')',iTimeOut);
}
function SKFEMenuItem__UpdateMouseOverExt(menu_obj_id,menuitem_obj_id){
 if(typeof SKMenus=='undefined')return;
 var oMenuItem=SKMenus[menu_obj_id].getMenuItemById(menuitem_obj_id);
SKFEMenuItem_SetActive(oMenuItem,SKFEMIColors[oMenuItem.props.id]);
}
function SKFEMenuItem__UpdateMouseOut(menu_obj_id,menuitem_obj_id){
 if(typeof SKMenus=='undefined')return;
 var oMenu=SKMenus[menu_obj_id];
 var oMenuItem=oMenu.getMenuItemById(menuitem_obj_id);
window.clearTimeout(oMenuItem.MOutTimeout);
 window.clearTimeout(oMenuItem.MOverTimeout);
 window.clearTimeout(oMenuItem.MDefaultTimeout);
var iTimeOut=500;
if(oMenuItem.subItemsCount > 0){
 iTimeOut=1000;
}
oMenuItem.MOutTimeout=window.setTimeout('SKFEMenuItem__UpdateMouseOutExt('+menu_obj_id+', '+menuitem_obj_id+', '+SKFEMIColors[oMenuItem.props.id]+')',iTimeOut);
 bSetDefaultActive=true;
}
function SKFEMenuItem__UpdateMouseOutExt(menu_obj_id,menuitem_obj_id){
 if(typeof SKMenus=='undefined')return;
 var oMenuItem=SKMenus[menu_obj_id].getMenuItemById(menuitem_obj_id);
if(!oMenuItem.props.is_current&&!SKFEMenuItem_HasCurrentSubMenuItem(oMenuItem)){
 SKFEMenuItem_SetNotActive(oMenuItem);
}
var iTimeOut=20;
if(bSetDefaultActive){
 oMenuItem.MDefaultTimeout=window.setTimeout('SKFEMenuItem_SetDefaultMIState('+menu_obj_id+', '+SKFEMIColors[oMenuItem.props.id]+')',iTimeOut);
}
}
function SKFEMenuItem_GetDefaultMIState(menu_obj_id){
 if(typeof SKMenus=='undefined')return;
 var oMenu=SKMenus[menu_obj_id];
 for(var i in oMenu.menuItems){
 if(oMenu.menuItems[i].props.is_current||SKFEMenuItem_HasCurrentSubMenuItem(oMenu.menuItems[i])){
 nDefaultActiveId=i;
}
}
}
function SKFEMenuItem_SetDefaultMIState(menu_obj_id){
 if(typeof SKMenus=='undefined')return;
 if(nDefaultActiveId!=0){
 var oMenu=SKMenus[menu_obj_id];
 var oMenuItem=oMenu.menuItems[nDefaultActiveId];
 SKFEMenuItem_SetActive(oMenuItem);
}
}
function SKFEMenuItem_SetActive(oMenuItem){
SKFEMenuItem_ShowCMILine(SKFEMIColors[oMenuItem.props.id]);
SKFEMenuItem_ShowTab(oMenuItem);
if(typeof SKMenus=='undefined')return;
 var oMenu=SKMenus[oMenuItem.menuId];
if(nLastActiveIndex > 0){
 if(nLastActiveIndex!=oMenuItem.menuItemIndex){
 SKFEMenuItem_SetNotActive(oMenu.getMenuItemByIndex(nLastActiveIndex),'qqq');
 window.clearTimeout(oMenu.getMenuItemByIndex(nLastActiveIndex).MOutTimeout);
}
}
var oPrevMenuItem=oMenu.getMenuItemByIndex(oMenuItem.menuItemIndex-1);
 var oNextMenuItem=oMenu.getMenuItemByIndex(oMenuItem.menuItemIndex+1);
if(oPrevMenuItem!=null){
 SKFEMenuItem_ShowCMILineRoundedCorner(oMenuItem.menuId,oMenuItem.props.id);
}else{
 SKFEMenuItem_HideCMILineRoundedCorner(oMenuItem.menuId,oMenuItem.props.id);
}
if(oMenuItem.subItemsCount > 0){
SKFEMenuItem_ShowSubItems(oMenuItem);
for(var i in oMenuItem.subItems){
 oMenuItem.subItems[i].updateCurrentState();
}
}else{
 SKFEMenuItem_HideSubItems(oMenuItem);
}
nLastActiveIndex=oMenuItem.menuItemIndex;
}
function SKFEMenuItem_SetNotActive(oMenuItem,bHideCMILine){
if(typeof SKMenus=='undefined')return;
 var oMenu=SKMenus[oMenuItem.menuId];
var oPrevMenuItem=oMenu.getMenuItemByIndex(oMenuItem.menuItemIndex-1);
 var oNextMenuItem=oMenu.getMenuItemByIndex(oMenuItem.menuItemIndex+1);
SKFEMenuItem_HideTab(oMenuItem);
if(oPrevMenuItem!=null&&!oMenuItem.props.is_current){
 SKFEMenuItem_HideCMILineRoundedCorner(oMenuItem.menuId,oMenuItem.props.id);
}
if(typeof bHideCMILine=='undefined'){
 SKFEMenuItem_HideCMILine(oMenuItem.props.id);
}
SKFEMenuItem_HideSubItems(oMenuItem);
}
function SKFEMenuItem_ShowTab(oMenuItem){
 document.getElementById(SK_MENUITEM_TD_PREFIX+oMenuItem.props.id+'_left_image').style.visibility='visible';
 document.getElementById(SK_MENUITEM_TD_PREFIX+oMenuItem.props.id+'_right_image').style.visibility='visible';
 document.getElementById(SK_MENUITEM_TD_PREFIX+oMenuItem.props.id+'_holder').style.backgroundColor=SKFE_COLORS[SKFEMIColors[oMenuItem.props.id]].color;
}
function SKFEMenuItem_HideTab(oMenuItem){
 document.getElementById(SK_MENUITEM_TD_PREFIX+oMenuItem.props.id+'_left_image').style.visibility='hidden';
 document.getElementById(SK_MENUITEM_TD_PREFIX+oMenuItem.props.id+'_right_image').style.visibility='hidden';
 document.getElementById(SK_MENUITEM_TD_PREFIX+oMenuItem.props.id+'_holder').style.backgroundColor=MI_HIDDEN_BCKG_COLOR;
}
function SKFEMenuItem_HasCurrentSubMenuItem(oMenuItem){
 if(typeof(oMenuItem.hasCurrentSubItem)!='undefined'){
 return oMenuItem.hasCurrentSubItem;
}
if(oMenuItem.subItemsCount > 0){
for(var i in oMenuItem.subItems){
 if(oMenuItem.subItems[i].props.is_current){
 oMenuItem.hasCurrentSubItem=true;
 return true;
}
}
}
oMenuItem.hasCurrentSubItem=false;
 return false
}
function SKFEMenuItem_ShowSubItems(oMenuItem){
 if(oMenuItem.subItemsCount > 0){
oMenuItem.setSubMenuPosition();
 document.getElementById(SK_SUBMENU_CONTAINER_PREF+oMenuItem.props.id).style.backgroundColor=SKFE_COLORS[SKFEMIColors[oMenuItem.props.id]].color;
 SKLayerShow(SK_SUBMENU_CONTAINER_PREF+oMenuItem.props.id);
 for(var i in oMenuItem.subItems){
 oMenuItem.subItems[i].updateCurrentState();
}
oMenuItem.isOpen=true;
}
}
function SKFEMenuItem__ShowSubMenu(){
}
function SKFEMenuItem__HideSubMenu(){
}
function SKFEMenuItem_HideSubItems(oMenuItem){
 oMenuItem.isOpen=false;
 SKLayerHide(SK_SUBMENU_CONTAINER_PREF+oMenuItem.props.id);
}
function SKFEMenuItem_SetCMILinePosition(){
 if(!document.getElementById(SKFE_HEADER_TABLE)||
!document.getElementById(SKFE_MAIN_TABLE)||
!document.getElementById(SKFE_MENU_LINE_DIV))
{
 return;
}
var top=document.getElementById(SKFE_HEADER_TABLE).offsetHeight+28;
 var left=document.getElementById(SKFE_MAIN_TABLE).offsetLeft;
 var width=document.getElementById(SKFE_HEADER_TABLE).offsetWidth;
document.getElementById(SKFE_MENU_LINE_DIV).style.left=left;
 document.getElementById(SKFE_MENU_LINE_DIV).style.top=top;
 document.getElementById(SKFE_MENU_LINE_DIV).style.width=width;
}
function SKFEMenuItem_ShowCMILine(cs_id){
 if(document.getElementById(SKFE_MENU_LINE_DIV)&&
 document.getElementById(SKFE_MENU_LINE_DIV).style.display=='none')
{
 SKFEMenuItem_SetCMILinePosition();
 document.getElementById(SKFE_MENU_LINE_DIV).style.backgroundColor=SKFE_COLORS[cs_id].color;
 document.getElementById(SKFE_MENU_LINE_DIV).style.display='block';
}else{
 document.getElementById(SKFE_MENU_LINE_DIV).style.backgroundColor=SKFE_COLORS[cs_id].color;
}
}
function SKFEMenuItem_HideCMILine(){
 if(document.getElementById(SKFE_MENU_LINE_DIV)&&
 document.getElementById(SKFE_MENU_LINE_DIV).style.display=='block')
{
 document.getElementById(SKFE_MENU_LINE_DIV).style.display='none';
}
}
function SKFEMenuItem_ShowCMILineRoundedCorner(menu_obj_id,menuitem_obj_id){
 if(document.getElementById('corner_ul_green')&&
 document.getElementById('corner_ul_green').style.visibility=='hidden')
{
 document.getElementById('corner_ul_green').style.visibility='visible';
}
}
function SKFEMenuItem_HideCMILineRoundedCorner(menu_obj_id,menuitem_obj_id){
 if(document.getElementById('corner_ul_green')&&
 document.getElementById('corner_ul_green').style.visibility=='visible')
{
 document.getElementById('corner_ul_green').style.visibility='hidden';
}
}
function SKFE_AddMainMenuItem(node_id,mi_target,mi_link,mi_text,mi_color){
if(mi_link==''){
 mi_link='javascript: void(0);';
}
var mi_current=false;
 if(current_page_url==mi_link){
 mi_current=true;
}
var template_code='';
if(mi_cnt==0){
 template_code=document.getElementById('sk_menuitem_tmpl_0').value;
}else{
 template_code=document.getElementById('sk_menuitem_tmpl_1').value;
}
var oLayouts={};
 oLayouts[SKM_CONST.TEXT_LAYOUT]={
template : template_code,
 max_chars : 50,
 text : mi_text,
 template_props :{
 menuitem_class : 'mi_main_link_'+mi_color
}
}
var mi_props={
 id : node_id,
 href : mi_link,
 target : mi_target,
 color : mi_color,
 is_current : mi_current,
 default_layout : SKM_CONST.TEXT_LAYOUT,
 layouts : oLayouts
}
if(typeof SKMenus=='undefined')return;
 SKMenus[1].addMenuItem(mi_props);
SKFEMIColors[mi_props.id]=mi_color;
var oSKFEMenuItem=SKMenus[1].getMenuItemById(mi_props.id);
oSKFEMenuItem.setSubMenuPosition=SKFEMenuItem__SetSubMenuPosition;
 oSKFEMenuItem.hideSubMenu=SKFEMenuItem__HideSubMenu;
 oSKFEMenuItem.showSubMenu=SKFEMenuItem__ShowSubMenu;
}
var SKFEMIColors=new Array();

function SetReferrerCookie(){
 var sDomainName=GetDomain(document.referrer);
 if(sDomainName!=document.domain){
 SetCookie('sitekreator_referrer_url',document.referrer);
}
}
function SetReferrerHiddenField(){
 var sReferrerUrl=GetCookie('sitekreator_referrer_url');
 if(sReferrerUrl!=-1&&sReferrerUrl!=null){
 document.forms['SignUpForm'].Referrer.value=sReferrerUrl;
}
}
function SetRegisteredUserCookie(){
var expire_date=new Date()
 expire_date.setFullYear(2020,0,1);
SetCookie('Registered__User',1,expire_date);
}
function IsRegisteredUser(){
 var bRegisteredUser=GetCookie('Registered__User');
if(bRegisteredUser){
 return true;
}
return false;
}
function GoToHomePage(registered_url,not_registered_url){
 if(IsRegisteredUser()){
 window.open(registered_url,'_self');
}else{
 window.open(not_registered_url,'_self');
}
}

function SKFESubItem__UpdateCurrentState(){
 return
}
function SKFE_AddSubMenuItem(node_id,parent_id,si_target,si_link,si_text,si_color){
if(si_link==''){
 si_link='javascript: void(0);';
}
var subitem_class='si_link_'+mi_color;
var si_current=false;
 if(current_page_url==si_link){
 si_current=true;
 subitem_class='si_link_current';
}
if(typeof SKMenus=='undefined')return;
 var si_parent=SKMenus[1].getMenuItemById(parent_id);
var oLayouts={};
 oLayouts[SKM_CONST.TEXT_LAYOUT]={
template : document.getElementById('sk_subitem_tmpl_1').value,
 max_chars : 50,
 text : si_text,
 template_props :{
 subitem_class : subitem_class,
 subitem_cs_id : mi_color
}
}
var si_props={
 id : node_id,
 href : si_link,
 target : si_target,
 color : si_color,
 is_current : si_current,
 default_layout : SKM_CONST.TEXT_LAYOUT,
 layouts : oLayouts
}
si_parent.addSubItem(si_props);
 var oSKFESubMenuItem=si_parent.getSubMenuItemById(si_props.id);
oSKFESubMenuItem.updateCurrentState=SKFESubItem__UpdateCurrentState;
}

function SKFEMenu(props){
this.inherit=FUSS;
 this.inherit(props);
this.Event('oninit',true);
this.ondeactivate=function(event_name,change_template){
 this.Reset();
 this.ExecuteEventBase('oninit',true);
}
}
function SKFEConfigureMicroItem(fuss_house,menu_item_id,menu_item_link_id){
var props={
 house : fuss_house,
 id : menu_item_id,
 data :{
 menu_item : document.getElementById(menu_item_link_id).innerHTML
},
 templates :{
 oninit :{template: "mi_onmouseevent",effects:[]}
}
};
document.getElementById(menu_item_link_id).style.display='none';
var objname=new SKFEMenu(props);
}

var SK_MENU_TMPL_PREF="sk_menu_tmpl_";
var SK_MENU_CONTAINER_PREF="sk_menu_container_";
var SK_MENUITEM_LINK_PREFIX="sk_mi_link_";
var SK_MENUITEM_TD_PREFIX="sk_mi_td_";
var SK_SUBMENU_CONTAINER_PREF="sk_submenu_div_";
var SK_SUBMENU_MAX_OPACITY=99;
var SK_MENU_STROLL_LENGTH=30;
var SKM_CONST={
 FLASH_LAYOUT : 1,
 TEXT_LAYOUT : 2,
 IMAGEN_LAYOUT : 3,
qqq : 0
}

function SKMenu(oProps){
this.props=oProps;
this.menuItems=[];
this.menuItemsIndexId=[];
this.menuItemsCount=0;
this.addMenuItem=function(oMIProps){
 this.menuItemsCount++;
 this.menuItems[oMIProps.id]=new SKMenuItem(this.props.id,oMIProps,this.menuItemsCount);
 this.menuItemsIndexId[this.menuItems[oMIProps.id].menuItemIndex]=oMIProps.id;
}
this.hideSubMenus=function(){
 for(var i in this.menuItems){
 this.menuItems[i].hideSubMenu();
}
}
this.print=function(){
if(this.menuItemsCount==0){
 return;
}
var sMenuItemsHTML='';
for(var i in this.menuItems){
 sMenuItemsHTML+=this.menuItems[i].getHTML();
}
var sMenuTemplate=document.getElementById(SK_MENU_TMPL_PREF+this.props.id).value;
var oCommonProps={
 menuitems : sMenuItemsHTML
}
for(var i in this.props.tmpl_props){
 oCommonProps[i]=this.props.tmpl_props[i];
}
var sMenuHTML=sMenuTemplate.supplant(oCommonProps);
document.getElementById(SK_MENU_CONTAINER_PREF+this.props.id).innerHTML=sMenuHTML;
for(var i in this.menuItems){
 this.menuItems[i].onMenuPrint();
 this.menuItems[i].updateCurrentState();
}
}
this.getMenuItemById=function(sID){
 return this.menuItems[sID];
}
this.getMenuItemByIndex=function(iMIIndex){
 if(!this.menuItemsIndexId[iMIIndex]){
 return null;
}
 return this.getMenuItemById(this.menuItemsIndexId[iMIIndex])
}
 var self=this;
}

var TIMEOUT_TO_HIDE_SUBMENU=500;
function SKMenuItem(sMenuId,oMIProps,iMIIndex){
this.menuId=sMenuId;
this.menuItemIndex=iMIIndex;
this.slideContentObj=null;
this.props=oMIProps;
this.isOpen=false;
this.timeoutHandler=0;
this.subItems=new Array();
 this.subItemsCount=0;
this.addSubItem=function(oSIProps){
 this.subItemsCount++;
 this.subItems[oSIProps.id]=new SKMenuItem(this.menuId,oSIProps,this.subItemsCount);
}
this.getSubMenuItemById=function(sID){
 return this.subItems[sID];
}
this.showSubMenu=function(){
if(typeof SKMenus=='undefined')return;
 SKMenus[this.menuId].hideSubMenus();
 this.isOpen=true;
 this.updateCurrentState();
 if(this.subItemsCount==0){
 return;
}
 this.setSubMenuPosition();
 SKLayerShow(SK_SUBMENU_CONTAINER_PREF+this.props.id);
 this.playAnimation(0);
}
this.hideSubMenu=function(){
 this.isOpen=false;
 SKLayerHide(SK_SUBMENU_CONTAINER_PREF+this.props.id);
 if(!isUndefined(this.props.subMenuOpacity)){
 this.props.subMenuOpacity=0;
 this.opacityChange(0);
}
 this.updateCurrentState();
}
this.playAnimation=function(direction){
if(direction!=0){
 this.hideSubMenu();
}
}
this.setSubMenuPosition=function(){
}
this.updateCurrentState=function(){
}
this.opacityChange=function(iOpacity){
this.props.subMenuOpacity=iOpacity;
var oSubMenuLayer=document.getElementById(SK_SUBMENU_CONTAINER_PREF+this.props.id);
if(this.props.subMenuOpacity < 0){
 this.props.subMenuOpacity=0;
 this.hideSubMenu();
}
if(this.props.subMenuOpacity > SK_SUBMENU_MAX_OPACITY){
 this.props.subMenuOpacity=SK_SUBMENU_MAX_OPACITY;
 if(document.all){
 oSubMenuLayer.style.filter='';
}else{
 oSubMenuLayer.style.MozOpacity=99/100;
}
 return;
}
if(document.all){
 oSubMenuLayer.style.filter='alpha(opacity='+this.props.subMenuOpacity+')';
}else{
 oSubMenuLayer.style.MozOpacity=this.props.subMenuOpacity/100;
}
}
this.getHTML=function(){
var sSubItemsHTML='';
 for(var i in this.subItems){
 sSubItemsHTML+=this.subItems[i].getHTML();
}
var sLayoutType=this.props.default_layout;
 var oLayout=this.props.layouts[sLayoutType];
if(sLayoutType==SKM_CONST.FLASH_LAYOUT&&
 isDefined(oLayout.alternative_layout)&&
 isDefined(oLayout.required_version)){
var iRequiredFlashVersion=oLayout.required_version;
 if(iRequiredFlashVersion > INSTALLED_FLASH_VERSION){
oLayout=this.props.layouts[oLayout.alternative_layout];
 sLayoutType=oLayout.alternative_layout;
}
}
if(sLayoutType==SKM_CONST.FLASH_LAYOUT){
 if(!oLayout.template_props){
 oLayout.template_props={};
}
oLayout.template_props['flash_code']=ComposeFlashCode(oLayout);
}else if(sLayoutType==SKM_CONST.TEXT_LAYOUT){
var sCutSuffix='...';
 if(oLayout.cut_suffix){
 sCutSuffix=oLayout.cut_suffix;
}
if(oLayout.max_chars&&oLayout.text.length > oLayout.max_chars){
 oLayout.text=oLayout.text.substr(0,oLayout.max_chars-sCutSuffix.length);
 oLayout.text+=sCutSuffix;
}
if(oLayout.wrap_chars){
var iMaxTextChunkLength=oLayout.wrap_chars;
 var sMIText='';
var arrSITextChunks=oLayout.text.split(' ');
 for(var i=0;i < arrSITextChunks.length;i++){
var sTextChunk=arrSITextChunks[i];
if(sTextChunk.toString().length > iMaxTextChunkLength){
var sModifiedTextChunk='';
 function _add_new_lines(sText){
 return sText.substr(0,iMaxTextChunkLength)+'<br>';
}
var j=0;
 var sRemainingText='';
 do{
var sStartText=_add_new_lines(sTextChunk.substr(j*iMaxTextChunkLength,(j+1)*iMaxTextChunkLength));
 j++;
sRemainingText=sTextChunk.substr(j*iMaxTextChunkLength,(j+1)*iMaxTextChunkLength);
 sModifiedTextChunk+=sStartText;
}while(sRemainingText.length > iMaxTextChunkLength);
sTextChunk=sModifiedTextChunk+sRemainingText;
}
sMIText+=sTextChunk+' ';
}
oLayout.text=sMIText.replace(/ $/,'');
}
var re=/{/g;
 oLayout.text=oLayout.text.replace(re, "&#123;");
 re=/}/g;
 oLayout.text=oLayout.text.replace(re, "&#125;");
if(!oLayout.template_props){
 oLayout.template_props={};
}
 oLayout.template_props['menuitem_text']=oLayout.text;
}else if(sLayoutType==SKM_CONST.IMAGEN_LAYOUT){
}
if(this.props.slide_content){
 this.slideContentObj=SlideContent_Create(this.props.slide_content_props);
 ONLOAD_FUNCTIONS.push('SlideContent_GetById("' + this.slideContentObj.id + '").init()');
}
var sMenuItemTmpl=oLayout.template;
 var sWceIconCode=SKGetIconHTML(this.props.id);
var oCommonProps={
 menuitem_obj_id : this.props.id,
 menu_obj_id : this.menuId,
menuitem_td_id : SK_MENUITEM_TD_PREFIX+this.props.id,
 menuitem_mouseover : "if( typeof SKMenus != 'undefined' ) { SKMenus["+this.menuId+"].getMenuItemById('"+this.props.id+"').onmouseover(); }",
 menuitem_mouseout : "if( typeof SKMenus != 'undefined' ) { SKMenus["+this.menuId+"].getMenuItemById('"+this.props.id+"').onmouseout(); }",
 menuitem_id : SK_MENUITEM_LINK_PREFIX+this.props.id,
 menuitem_href : this.props.href,
 menuitem_target : this.props.target,
menuitem_wce_icon : sWceIconCode,
 subitems_container_id : SK_SUBMENU_CONTAINER_PREF+this.props.id,
 subitem_block_mouseover : "if( typeof SKMenus != 'undefined' ) { SKMenus["+this.menuId+"].getMenuItemById('"+this.props.id+"').onmouseover(); }",
 subitem_block_mouseout : "if( typeof SKMenus != 'undefined' ) { SKMenus["+this.menuId+"].getMenuItemById('"+this.props.id+"').onmouseout(); }",
 subitems : sSubItemsHTML
}
if(this.slideContentObj!=null){
 oCommonProps['slide_content_start']=this.slideContentObj.getStartHtml();
 oCommonProps['slide_content_end']=this.slideContentObj.getEndHtml();
}
if(oLayout.template_props){
 for(var i in oLayout.template_props){
 oCommonProps[i]=oLayout.template_props[i];
}
}
 var sMenuitemHTML=sMenuItemTmpl.supplant(oCommonProps);
return sMenuitemHTML;
}
this.onmouseover=function(){
 if(this.slideContentObj!=null){
 this.slideContentObj.forward();
}
if(this.subItemsCount > 0){
 window.clearInterval(this.timeoutHandler);
 this.timeoutHandler=0;
 if(!this.isOpen){
 this.showSubMenu();
}
}
}
this.onmouseout=function(){
if(this.slideContentObj!=null){
 this.slideContentObj.backward();
}
if(this.subItemsCount > 0){
if(this.timeoutHandler==0){
 this.timeoutHandler=window.setTimeout('if( typeof SKMenus != "undefined" ) { SKMenus['+this.menuId+'].getMenuItemById('+this.props.id+').playAnimation(1); }',TIMEOUT_TO_HIDE_SUBMENU);
}
}
}
this.onMenuPrint=function(){
}
function ComposeFlashCode(oProps){
var sHtml=''+
 '<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    = "' + oProps.flash_width + '" '+
 'HEIGHT   = "' + oProps.flash_height + '" '+
 '>'+
'<PARAM NAME = "FlashVars" VALUE = "' + oProps.flash_vars + '">'+
 '<PARAM NAME = "movie"     VALUE = "' + oProps.flash_src + '">'+
 '<PARAM NAME = "quality"   VALUE = "high">';
if(oProps.flash_is_transparent){
 sHtml+='<PARAM NAME = "wmode"   VALUE = "transparent">';
}
if(oProps.flash_bg_color){
 sHtml+='<PARAM NAME = "bgcolor" VALUE = "' + oProps.flash_bg_color + '">';
}
sHtml+='<EMBED src         = "' + oProps.flash_src + '" '+
 'quality     = "high" '+
 'width       = "' + oProps.flash_width + '" '+
 'height      = "' + oProps.flash_height + '" '+
 'type        = "application/x-shockwave-flash" '+
 'pluginspage = "http://www.macromedia.com/go/getflashplayer" '+
 'FlashVars   = "' + oProps.flash_vars + '" ';
if(oProps.flash_bg_color){
 sHtml+='bgcolor = "' + oProps.flash_bg_color + '" ';
}
 sHtml+='></EMBED>'+
 '</OBJECT>';
return sHtml;
}
var self=this;
}

function SKLayerShow(id){
	document.getElementById(id).style.display="block";
}
function SKLayerHide(id){
	document.getElementById(id).style.display="none";
}
function SKGetIconHTML(id){
 var code='';
 if(admin){
 var menu=eval('wce_menu_'+id);
 var code=menu.GetRenderCode();
}
 return code;
}

function FUSS(props){
this.Init=function(){
 this.reg_handle=new String();
 this.placeholder=props.id;
 this.data=props.data;
 this.templates=props.templates;
 this.house=typeof props.house=='undefined'?new FUSSHouse(): props.house;
 this.current_event=new String();
 this.last_event=new String();
 this.last_error=new String();
 this.last_warning=new String();
 this.session_data=new Object();
}
this.LogError=function(error_message){
 this.last_error=error_message;
}
this.LogWarning=function(warning_message){
 this.last_warning=warning_message;
}
this.GetLastError=function(){
 return this.last_error;
}
this.GetLastWarning=function(){
 return this.last_warning;
}
this.ExecuteEventDelayed=function(event_name,change_template,delay){
this.house.Report(this.GetObjectHandle(),event_name);
if(typeof delay=='undefined'||delay==0){
 this.ExecuteEventBase(event_name,change_template);
}else{
 var source_obj_handle=this.GetObjectHandle();
 FUSS__DelayedEvent(source_obj_handle,event_name,this.templates[event_name].delay,change_template);
}
}
this.ExecuteEventBase=function(event_name,change_template){
 this.last_event=this.current_event;
 this.current_event=event_name;
try{
 eval('this.'+event_name+'('+change_template+')');
}
 catch(e){
 if(change_template){
 this.last_change_template_event=this.last_event;
 this.DisplayTemplate(event_name);
}
}
this.Effects(event_name);
}
this.Event=function(event_name){
 if(typeof this.templates[event_name]!='undefined'&&
 typeof this.templates[event_name].delay!='undefined'){
 this.ExecuteEventDelayed(event_name,true,this.templates[event_name].delay);
}else{
 this.ExecuteEventDelayed(event_name,true,0);
}
}
this.Effects=function(event_name){
 if(typeof this.templates[event_name]!='undefined'&&
 typeof this.templates[event_name].effects=="object"){
 for(var i in this.templates[event_name].effects){
 try{
 this.templates[event_name].effects[i].Apply(event_name,this.GetObjectHandle());
}
 catch(e){
 this.LogError("Effects: Trying to execute undefined effect for event = ["+event_name+"]");
}
}
}else{
 this.LogWarning("Effects: Undefined templates or effects for event = ["+event_name+"]");
}
}
this.Reset=function(){
 FUSS__ClearTimerHandle(this.GetObjectHandle());
 this.Init();
 var event_names=this.GetEventNames();
 for(var i=0;i < event_names.length;i++){
 this.SetEventTemplateVisibility(event_names[i],false);
 if(typeof this.templates[event_names[i]].effects!='undefined'){
 for(var effect_name in this.templates[event_names[i]].effects){
 try{
 this.templates[event_names[i]].effects[effect_name].Reset(this.GetObjectHandle());
}catch(e){}
}
}
}
}
this.DisplayTemplate=function(event_name){
 if(!this.templates[this.last_change_template_event]||this.templates[this.last_change_template_event].template!=this.templates[event_name].template){
 this.SetEventTemplateVisibility(this.last_change_template_event,false);
 this.SetEventTemplateVisibility(event_name,true);
}
}
this.SetEventTemplateVisibility=function(event_name,visible){
 var template=this.GetTemplateByEvent(event_name);
 if(template!=null){
 template.style.visibility=visible?'visible' : 'hidden';
}
}
this.GetCurrentTemplate=function(){
 return this.GetTemplateByEvent(this.current_event);
}
this.GetTemplateByEvent=function(event_name){
 var template_id=props.id+'__'+event_name;
 if(document.getElementById(template_id)==null||
 typeof document.getElementById(template_id)=='undefined')
{
 this.LogError("GetTemplateByEvent: Missing template ID = ["+template_id+"]");
 return null;
}
 return document.getElementById(template_id);
}
this.GetEventNames=function(){
 var event_names=new Array();
 for(var event_name in props.templates){
 event_names[event_names.length]=event_name;
}
 return event_names;
}
this.GetObjectHandle=function(){
 return this.data.self;
}
function SetObjectHandle(obj,handle_id){
 obj.data.self=handle_id;
}
function RegisterObject(obj){
 var handle_id='__FUSS__VAR__'+obj.placeholder;
 eval(handle_id+' = obj');
 SetObjectHandle(obj,handle_id);
}
function CreateLayers(){
if(document.getElementById(props.id)==null||typeof document.getElementById(props.id)=='undefined'){
 return;
}
var oTextArea=document.getElementById(props.id);
 var oPlaceholderHTML=oTextArea.value.supplant(props.data);
 var oSpan=document.createElement('SPAN');
 oSpan.innerHTML=oPlaceholderHTML;
for(var event_name in props.templates){
 var HtmlToInclude=
 document.getElementById(eval('props.templates.'+event_name+'.template')).value.supplant(props.data);
 var oDummySpan=document.createElement('SPAN');
 oDummySpan.innerHTML=HtmlToInclude;
 if(document.all){
 oDummySpan.childNodes[0].id=props.id+'__'+event_name;
 oSpan.childNodes[0].innerHTML+=oDummySpan.innerHTML;
}else{
 oDummySpan.childNodes[1].id=props.id+'__'+event_name;
 oSpan.childNodes[1].innerHTML+=oDummySpan.innerHTML;
}
}
oTextArea.parentNode.insertBefore(oSpan,oTextArea);
 oTextArea.parentNode.removeChild(oTextArea);
}
if(props==null||typeof props=='undefined'){
 this.LogError('FUSS: props is null or undefined!');
 props={};
}
 if(props.id==null||typeof props.id=='undefined'){
 this.LogError('FUSS: props.id is null or undefined!');
 props.id=new String();
}
 if(props.templates==null||typeof props.templates!='object'){
 this.LogError('FUSS: props.templates does not exist or is not a hash!');
 props.templates={};
}
 if(props.data==null||typeof props.data!='object'){
 props.data={};
}
this.Init();
RegisterObject(this);
 CreateLayers();
this.house.Add(this);
}
var FUSS_TIMEOUTS=new Array();
function FUSS__DelayedEvent(handle,event_name,interval,change_template){
 FUSS__ClearTimerHandle(handle,event_name);
 var command=handle+'.ExecuteEventDelayed("' + event_name + '", '+change_template+', 0);';
 if(!(handle in FUSS_TIMEOUTS)){
 FUSS_TIMEOUTS[handle]=[];
}
 FUSS_TIMEOUTS[handle][event_name]=window.setTimeout(command,interval);
}
function FUSS__ClearTimerHandle(handle,event_name){
 if(!event_name){
for(var current_event in FUSS_TIMEOUTS[handle]){
 if(handle in FUSS_TIMEOUTS&&current_event in FUSS_TIMEOUTS[handle]){
 window.clearTimeout(FUSS_TIMEOUTS[handle][current_event]);
}
}
}else{
 if(handle in FUSS_TIMEOUTS&&event_name in FUSS_TIMEOUTS[handle]){
 window.clearTimeout(FUSS_TIMEOUTS[handle][event_name]);
}
}
}
function FUSSHouse(){
 this.fuss_objects=[];
this.Add=function(fuss_object){
 this.fuss_objects[fuss_object.GetObjectHandle()]=fuss_object;
}
this.Report=function(handle,event_name){
 if(typeof this.last_handle!='undefined'&&this.last_handle!=handle){
 if(typeof this.fuss_objects[handle]!='undefined'){
 for(var fuss_object in this.fuss_objects){
 if(fuss_object!=handle){
 this.fuss_objects[fuss_object].ExecuteEventBase('ondeactivate');
}
}
 this.fuss_objects[handle].ExecuteEventBase('onactivate');
}
}
 this.last_handle=handle;
}
}

var FUSSEffects={};
FUSSEffects.Slide=function(props){
this.inherit=FUSS;
 this.inherit(props);
this.slide_offset=props.content_width-props.window_width;
 this.slide_start=-props.offset_x;
 this.slide_end=this.slide_start-this.slide_offset;
 this.slide_pos=this.slide_start;
this.Reset=function(){
 this.slide_offset=props.content_width-props.window_width;
 this.slide_start=-props.offset_x;
 this.slide_end=this.slide_start-this.slide_offset;
 this.slide_pos=this.slide_start;
}
this.Apply=function(event_name,source_obj_handle){
var handle=eval(source_obj_handle);
 var current_template=handle.GetCurrentTemplate();
switch(event_name){
 case "onmouseover":{
FUSS__ClearTimerHandle(source_obj_handle,'onslideright');
 handle.SetEventTemplateVisibility('onslideright',false);
 FUSS__DelayedEvent(source_obj_handle,'onslideleft',props.timeout,true);
 break;
}
 case "onmouseout" :{
 FUSS__ClearTimerHandle(source_obj_handle,'onslideleft');
 FUSS__DelayedEvent(source_obj_handle,'onslideright',props.timeout,false);
 break;
}
 case "onslideleft" :{
 if(!this.Slide(source_obj_handle,-1)&&this.slide_pos > this.slide_end){
 FUSS__DelayedEvent(source_obj_handle,'onslideleft',props.timeout,false);
}
 break;
}
 case "onslideright" :{
 if(!this.Slide(source_obj_handle,1)&&this.slide_pos < this.slide_start){
 FUSS__DelayedEvent(source_obj_handle,'onslideright',props.timeout,false);
}else{
handle.SetEventTemplateVisibility('onslideleft',false);
 handle.ExecuteEventDelayed('oninit',true,0);
}
 break;
}
}
}
this.Slide=function(source_obj_handle,dir){
if(typeof this.session_data.effects=='undefined'){
 this.session_data.effects=new Object();
}
if(typeof this.session_data.effects.slide_pos!='undefined'){
 this.slide_pos=this.session_data.effects.slide_pos;
}
if((dir==-1&&this.slide_pos > this.slide_end)||(dir==1&&this.slide_pos < this.slide_start)){
 this.slide_pos+=dir*props.step;
}
this.SetPosition(source_obj_handle);
 this.session_data.effects.slide_pos=this.slide_pos;
return(dir==-1)?(this.slide_pos < this.slide_end):(this.slide_pos > this.slide_start);
}
this.SetPosition=function(source_obj_handle){
var handle=eval(source_obj_handle);
 var event_names=handle.GetEventNames();
for(var i=0;i < event_names.length;i++){
 var template=handle.GetTemplateByEvent(event_names[i]);
 if(template){
 template.style.left=this.slide_pos;
}
}
}
}
FUSSEffects.Fade=function(props){
this.inherit=FUSS;
 this.inherit(props);
this.opacity=props.opacity_start;
this.Reset=function(source_obj_handle){
 this.opacity=props.opacity_start;
 this.session_data.effects.opacity=props.opacity_start;
 this.SetOpacity(source_obj_handle);
}
this.Apply=function(event_name,source_obj_handle){
switch(event_name){
 case "onmouseover":{
 FUSS__DelayedEvent(source_obj_handle,'onfadein',props.timeout,true);
 FUSS__ClearTimerHandle(source_obj_handle,'onmouseout');
 break;
}
 case "onmouseout" :{
 FUSS__DelayedEvent(source_obj_handle,'ondeactivate',props.timeout,true);
 break;
}
 case "onfadeout" :{
 if(this.Fade(source_obj_handle,-1)&&this.opacity > props.opacity_start){
 FUSS__DelayedEvent(source_obj_handle,'onfadeout',props.timeout,false);
}
 break;
}
 case "onfadein" :{
 if(this.Fade(source_obj_handle,1)&&this.opacity < props.opacity_end){
 FUSS__DelayedEvent(source_obj_handle,'onfadein',props.timeout,false);
}
 break;
}
}
}
this.Fade=function(source_obj_handle,dir){
if(!this.session_data.effects||typeof this.session_data.effects=='undefined'){
 this.session_data.effects=new Object();
}
if(this.session_data.effects.opacity&&typeof this.session_data.effects.opacity!='undefined'){
 this.opacity=this.session_data.effects.opacity;
}
if((dir==-1&&this.opacity > props.opacity_start)||(dir==1&&this.opacity < props.opacity_end)){
 this.opacity+=dir*props.step;
}
 this.SetOpacity(source_obj_handle);
 this.session_data.effects.opacity=this.opacity;
return(dir==-1)?(this.opacity < props.opacity_end):(this.opacity > props.opacity_start);
}
this.SetOpacity=function(source_obj_handle){
 var handle=eval(source_obj_handle);
 var event_names=handle.GetEventNames();
 for(var i=0;i < event_names.length;i++){
 var template=handle.GetTemplateByEvent(event_names[i]);
 var fading_layer=this.callbacks.GetLayer(template);
 if(fading_layer){
 fading_layer.style.filter="Alpha(opacity = "+this.opacity+")";
 fading_layer.style.MozOpacity=this.opacity/100;
}
}
}
this.GetFadeLayer=function(template){
 return template.parentNode;
}
if(typeof props.callbacks=='undefined'){
 props.callbacks={};
}
 if(typeof props.callbacks.GetLayer=='undefined'){
 props.callbacks.GetLayer=this.GetFadeLayer;
}
this.callbacks=props.callbacks;
}

String.prototype.entityify=function(){
 return this.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
}
String.prototype.quote=function(){
 return '"' + this.replace(/(["\\])/g, '\\$1') + '"';
}
String.prototype.supplant=function(oProps,bReplaceWithBlank,oCallBack){
 var i,j,vValue;
 var sString=this;
 var q=0;
 var sOpenTag=(isUndefined(oProps.__open_tag))?'{' : oProps.__open_tag;
 var sCloseTag=(isUndefined(oProps.__close_tag))?'}' : oProps.__close_tag;
for(;;){
 i=q+sString.substring(q,sString.length).indexOf(sOpenTag);
if(i < 0){
 break;
}
 if(i+1 <=q){
 break;
}
j=sString.indexOf(sCloseTag,i+1);
 if(j==-1){
 break;
}
if(isDefined(oCallBack)){
 vValue=oCallBack(sString.substring(i+1,j),oProps);
}else{
 vValue=oProps[sString.substring(i+1,j)];
}
if(isUndefined(vValue)){
 if(bReplaceWithBlank){
 vValue='';
}else{
 q=i+1;
 continue;
}
}
 sString=sString.substring(0,i)+vValue+sString.substring(j+1);
}
 return sString;
}
String.prototype.trim=function(){
 return this.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1");
}
if(!isFunction(Function.apply)){
 Function.prototype.apply=function(o,a){
 var r,x='____apply';
 if(!isObject(o)){
 o={};
}
 o[x]=this;
 switch((a&&a.length)||0){
 case 0:
 r=o[x]();
 break;
 case 1:
 r=o[x](a[0]);
 break;
 case 2:
 r=o[x](a[0],a[1]);
 break;
 case 3:
 r=o[x](a[0],a[1],a[2]);
 break;
 case 4:
 r=o[x](a[0],a[1],a[2],a[3]);
 break;
 case 5:
 r=o[x](a[0],a[1],a[2],a[3],a[4]);
 break;
 case 6:
 r=o[x](a[0],a[1],a[2],a[3],a[4],a[5]);
 break;
 default:
}
 delete o[x];
 return r;
}
}
Function.prototype.inherits=function(parent){
 var d=0,p=(this.prototype=new parent());
 this.prototype.uber=function uber(name){
 var f,r,t=d,v=parent.prototype;
 if(t){
 while(t){
 v=v.constructor.prototype;
 t-=1;
}
 f=v[name];
}else{
 f=p[name];
 if(f==this[name]){
 f=v[name];
}
}
 d+=1;
 r=f.apply(this,Array.prototype.slice.apply(arguments,[1]));
 d-=1;
 return r;
}
 return this;
}
Function.prototype.swiss=function(parent){
 for(var i=1;i < arguments.length;i+=1){
 var name=arguments[i];
 this.prototype[name]=parent.prototype[name];
}
 return this;
}
function isAlien(a){
 return isObject(a)&&typeof a.constructor!='function';
}
function isArray(a){
 return isObject(a)&&a.constructor==Array;
}
function isBoolean(a){
 return typeof a=='boolean';
}
function isEmpty(o){
 var i,v;
 if(isObject(o)){
 for(i in o){
 v=o[i];
 if(isUndefined(v)&&isFunction(v)){
 return false;
}
}
}
 return true;
}
function isFunction(a){
 return typeof a=='function';
}
function isNull(a){
 return typeof a=='object'&&!a;
}
function isNumber(a){
 return typeof a=='number'&&isFinite(a);
}
function isObject(a){
 return(a&&typeof a=='object')||isFunction(a);
}
function isString(a){
 return typeof a=='string';
}
function isUndefined(a){
 return typeof a=='undefined';
}
function isDefined(a){
 return typeof a!='undefined';
}
function stringify(arg){
 var i,o,v;
switch(typeof arg){
 case 'object':
 if(arg){
 if(arg.constructor==Array){
o='[';
 for(i=0;i < arg.length;++i){
 v=stringify(arg[i]);
 if(v!='function'&&!isUndefined(v)){
 o+=(o!='['?',' : '')+v;
}else{
 o+=',';
}
}
 return o+']';
}else if(typeof arg.toString!='undefined'){
 o='{';
 for(i in arg){
 v=stringify(arg[i]);
 if(v!='function'&&!isUndefined(v)){
 o+=(o!='{'?',' : '')+
 i.quote()+':'+v;
}
}
 return o+'}';
}else{
 return;
}
}
 return 'null';
 case 'unknown':
 case 'undefined':
 return;
 case 'string':
 return arg.quote();
 case 'function':
 return 'function';
 default:
 return String(arg);
}
}

function SetCookie(name,value,expires,path,domain,secure){
var exp_date=new Date(expires);
 var cur_cookie=name+"="+escape(value)+
((expires)?"; expires="+exp_date.toGMTString(): "")+
((path)?"; path="+path : "")+
((domain)?"; domain="+domain : "")+
((secure)?"; secure" : "");
document.cookie=cur_cookie;
}
function GetCookie(name){
var dc=document.cookie;
 var prefix=name+"=";
 var begin=dc.indexOf("; "+prefix);
if(begin==-1){
 begin=dc.indexOf(prefix);
 if(begin!=0)
 return null;
}else
 begin+=2;
var end=dc.indexOf(";",begin);
if(end==-1)
 end=dc.length;
return unescape(dc.substring(begin+prefix.length,end));
}
function DeleteCookie(name,path,domain){
if(GetCookie(name))
	document.cookie=name+"="+
	"; expires=Thu, 01-Jan-70 00:00:01 GMT"+
((path)?"; path="+path : "")+
((domain)?"; domain="+domain : "");
}

function UrlParams(url_str,delimiter){
var temp,
 i=0;
delimiter=delimiter?delimiter : '#';
if(url_str.indexOf(delimiter)==-1)
 return this.parameter=0;
url_str=url_str.substring(url_str.indexOf(delimiter)+1);
this.parameter=new Array;
do{
temp=url_str.indexOf(delimiter);
 if(temp==-1)break;
 this.parameter[i++]=url_str.slice(0,temp);
 url_str=url_str.substring(temp+1);
}while(url_str.indexOf(delimiter)!=-1)
this.parameter[i++]=url_str;
	return true;
}
function CgiParams(name,url_str,delimiter){
	delimiter=(delimiter)?delimiter : '&';
	var temp,
 cur_len,
 pattern=/\+/g;
url_str=url_str.substring(url_str.indexOf('?')+1);
temp=url_str.indexOf(name+'=')+1;
	if(temp!=0){
 cur_len=url_str.indexOf(delimiter,temp);
 if(cur_len==-1)
 cur_len=url_str.length;
 temp=url_str.slice(temp+name.length,cur_len);
 return temp.replace ( pattern, '  ');
}
	else
 return-1;
}
function GetDomain(url_str){
var temp=url_str.indexOf('://');
if(temp==-1)
 return-1;
url_str=url_str.substring(temp+3);
return url_str.slice(0,url_str.indexOf('/'));
}
function GetPath(url_str){
domain=GetDomain(url_str);
return	url_str.substring(url_str.indexOf(domain)+domain.length);
}
var PARSE_MODE_AA=0;
var DESIGN_DEFAULT_TEMPLATES=new Array();
var PARSE_MODE_EUA=1;
var PARSE_MODE_BOTH=2;
var PARSE_MODE_BOTH_PARSE_ONLY=3;
var SHARED_DCP_DIR="";
var PREFIX='sp__';
var TMPL_KEYS=new Array();
var CS=new Array();
var TEMP_CS=new Array();
var last_chosen_design_id=0;
var sp_loaded=false;
var OLD_SITE_PROPERTIES=new Array();
var SP_MESSAGES=new Array();
function CancelUpdate(){
 skip_update=false;
}
var skip_update=false;
function Update(onsubmit,publish)
{
 if(!sp_loaded||skip_update)return;
var form=document.ObjEditForm;
var site_title=form.elements[PREFIX+'SiteTitle'];
 var news_per_page=form.elements[PREFIX+'NewsPerPage'];
site_title.value=Trim(site_title.value);
if(site_title.value==''){
 alert(SP_MESSAGES['ENTER_SITE_TITLE']);
 site_title.focus();
 if(onsubmit)
 return false;
 return;
}
if(!AreDomainsCorrect()){
 alert(SP_MESSAGE['DOMAINS']);
 return;
}
if(news_per_page.value!=""&&!IsValidInteger(news_per_page.value)){
 alert(SP_MESSAGES['ENTER_VALID_NEWS_PER_PAGE']);
 news_per_page.focus();
 return;
}
var tmpl_obj=form.sp__DesignID;
 var tmpl_old=form.DesignID_old;
 var is_template_changed=tmpl_obj.options[tmpl_obj.selectedIndex].value!=tmpl_old.value;
 var is_style_changed=form.sp__SchemeKey.options[form.sp__SchemeKey.selectedIndex].value!=form.SchemeKey_old.value;
 var is_domain_changed=form.sp__Domain.value!=form.OLD__sp__Domain.value;
 var is_pass_changed=form.sp__SitePassword.value!=form.OLD__sp__SitePassword.value;
 var is_mlist_changed=form.sp__AllowFromMlistID.value!=form.OLD__sp__AllowFromMlistID.value;
 var is_logo_type_changed=typeof(form.sp__LogoType)!='undefined'&&
 typeof(form.RemoveLogo)!='undefined'&&form.RemoveLogo.checked;
 var is_logo_src_changed=typeof(form.sp__LogoSrc)!='undefined'&&form.sp__LogoSrc.value!="";
 var is_copyright_changed=typeof(form.sp__CopyrightText)!='undefined'&&form.sp__CopyrightText.value!=form.OLD__sp__CopyrightText.value;
var alert_shown=false;
if(is_template_changed||
 is_style_changed||
 SitePropertiesAreChanged()){
var update_button=new ConfirmationButton('Update','ParseSite( '+PARSE_MODE_BOTH_PARSE_ONLY+' );');
 var preview_button=new ConfirmationButton('Preview','ParseSite( '+PARSE_MODE_AA+' );');
 var cancel_button=new ConfirmationButton('Cancel','CancelUpdate()');
var buttons=new Array(update_button,preview_button,cancel_button);
ConfirmationBox(
 SHARED_DCP_DIR+'confirmation_box.html',
 SP_MESSAGES['CHANGE_SITE_PROPERTIES'],
 '400',
 '210',
 buttons);
 skip_update=true;
 return false;
}else if(is_domain_changed||
 is_pass_changed||
 is_mlist_changed||
 is_logo_type_changed||
 is_logo_src_changed||
 is_copyright_changed){
 form.do_load_site_properties.value="";
 form.do_pre_update_site_properties.value="go";
 form.do_update_site_properties.value="go";
 CoverPage('half_transparent.gif','updating','document.forms[ OBJ_EDIT_FORM ].submit( );');
 window.opener.CoverPage('half_transparent.gif','updating');
}else{
 alert(SP_MESSAGES['NO_CHANGES']);
 self.close();
}
}
function PublishAllChanges()
{
 var form=document.ObjEditForm;
if(!confirm(SP_MESSAGES['PUBLISH']))return;
ParseSite(PARSE_MODE_BOTH);
}
function ParseSite(mode)
{
 var form=document.ObjEditForm;
form.do_reparse_site.value="go";
if(mode==PARSE_MODE_AA||mode==PARSE_MODE_BOTH||mode==PARSE_MODE_BOTH_PARSE_ONLY)
 form.parse_aa.value="1";
if(mode==PARSE_MODE_EUA||mode==PARSE_MODE_BOTH){
 form.do_publish_site.value="go";
 form.do_publish_site_properties_only.value="go";
}
if(mode==PARSE_MODE_BOTH_PARSE_ONLY){
 form.do_publish_site_properties_only.value="go";
 form.parse_eua.value="1";
}
var info='updating';
 if(mode==PARSE_MODE_AA)
 info='previewing';
 CoverPage('half_transparent.gif',info,'document.forms[ OBJ_EDIT_FORM ].submit( );');
 window.opener.CoverPage('half_transparent.gif',info);
}
function SetLayoutTemplate(form_name,tmpl_select,color_select,layout_template_image_name,load_schemes)
{
 var form=document.forms[form_name];
var tmpl=eval('form.'+tmpl_select);
 var color=eval('form.'+color_select);
 var tmpl_key=DESIGN_DEFAULT_TEMPLATES[tmpl.options[tmpl.selectedIndex].value];
 var tmpl_value=TMPL_KEYS[tmpl_key];
var cs_sel_index=0;
if(load_schemes){
while(color.options.length)color.options[color.options.length-1]=null;
if(typeof(CS[tmpl_key])=="undefined"){
color.options[color.options.length]=new Option('-- No Color Schemes Available --','');
 if(confirm('There are not color schemes for this design. Submitting this form may corrupt your site. Whould you like to cancel this operation and close the window?')){
 self.close();
}
 return;
}
TEMP_CS=null;
 TEMP_CS=new Array();
function CSSort(a,b){
 return a.Description > b.Description?1 : a.Description < b.Description?-1 : 0;
}
CS[tmpl_key]=CS[tmpl_key].sort(CSSort);
for(var i=0;i < CS[tmpl_key].length;i++){
 var selected=CS[tmpl_key][i]._selected_;
 color.options[color.options.length]=new Option(CS[tmpl_key][i].Description,CS[tmpl_key][i].SchemeKey);
 color.options[color.options.length-1].selected=selected;
 TEMP_CS[CS[tmpl_key][i].SchemeKey]=CS[tmpl_key][i];
if(selected){
 cs_sel_index=i;
}
}
if(document.all){
var layer=new Layer('ColorSchemeDesc');
 var display=CS[tmpl_key].length==1?true : false;
 if(CS[tmpl_key].length==1){
 color.style.display="none";
 layer.SetDisplay(display);
}else{
 color.style.display="block";
 layer.SetDisplay(display);
}
var layer=new Layer('ColorSchemeSpaceBelow');
 if(layer.Success){
 layer.SetDisplay(display);
}
}
}
var is_template_changed=tmpl.options[tmpl.selectedIndex].value!=last_chosen_design_id;
if(is_template_changed){
if(cs_sel_index > color.options.length)
 cs_sel_index=0;
 color.selectedIndex=cs_sel_index;
 color.options[cs_sel_index].selected=true;
}
last_chosen_design_id=tmpl.options[tmpl.selectedIndex].value;
var img_to=document.images[layout_template_image_name];
 var color_value=color.options[color.selectedIndex].value;
if(typeof(tmpl_key)=="undefined"){
 return;
}
if(typeof(TEMP_CS[color_value])=="undefined"){
 return;
}
var obj_str='TEMPLATE_LAYOUT_'+tmpl_key+'_'+TEMP_CS[color_value].SchemeKey;
 if(eval('typeof( '+obj_str+' ) == \'undefined\'')){
 img_to.src=SPACE;
}else{
 img_to.src=eval(obj_str);
}
}
function SetTemplateDescription(form_name,tmpl_select_obj_name,tmpl_desc_holder)
{
 var form=document.forms[form_name];
if(document.getElementById(tmpl_desc_holder)!=null&&document.getElementById(tmpl_desc_holder)!='undefined'&&DESIGN_DESCRIPTION[form.elements[tmpl_select_obj_name].value]!='undefined'){
 document.getElementById(tmpl_desc_holder).innerHTML=DESIGN_DESCRIPTION[form.elements[tmpl_select_obj_name].value];
}
}
function SPInit()
{
var form=document.forms[OBJ_EDIT_FORM];
for(var i=0;i < form.elements.length;i++){
var oElement=form.elements[i];
 var sName=oElement.name;
 if(sName.indexOf(PREFIX)!=-1){
 OLD_SITE_PROPERTIES[sName]=form.elements[i].value;
}
}
 last_chosen_design_id=OLD_SITE_PROPERTIES[PREFIX+'DesignID'];
 sp_loaded=true;
}
function SitePropertiesAreChanged()
{
 var form=document.forms[OBJ_EDIT_FORM];
 for(var i=0;i < form.elements.length;i++){
var oElement=form.elements[i];
 var sName=oElement.name;
 if(sName!=PREFIX+'TmplKey'&&
 sName!=PREFIX+'SchemeKey'&&
 sName!=PREFIX+'Domain'&&
 sName!=PREFIX+'SitePassword'&&
 sName!=PREFIX+'AllowFromMlistID'&&
 sName!=PREFIX+'DesignID'&&
 sName.indexOf(PREFIX)!=-1){
 if(OLD_SITE_PROPERTIES[sName]!=form.elements[sName].value){
 return true;
}
}
}
return false;
}
function DeleteAccount(url,user_id)
{
 var request=new XMLHttpRequest();
 document.body.style.cursor='wait';
 request.open('GET',url+'?user_id='+user_id+'&status_variable=del_acct_status',false);
 request.send(null);
 document.body.style.cursor='default';
 if(request.readyState!=READY_STATE_COMPLETE||request.status!=HTTP_OK){
 alert(SP_MESSAGES['DELETE_ACCOUNT_NOTICE_FAILED']);
 return;
}
 try{
 eval(request.responseText);
 if(del_acct_status==0){
 alert(SP_MESSAGES['DELETE_ACCOUNT_NOTICE_FAILED']);
 return;
}else{
 alert(SP_MESSAGES['DELETE_ACCOUNT_NOTICE_OK']);
}
}catch(e){
 alert(SP_MESSAGES['DELETE_ACCOUNT_NOTICE_FAILED']);
 return;
}
}
function AreDomainsCorrect()
{
 return true;
}
SP_MESSAGES['DELETE_ACCOUNT_NOTICE_OK']="We have sent you an email with instructions on how to cancel your account.";
SP_MESSAGES['DELETE_ACCOUNT_NOTICE_FAILED']="System failure. Please try again later.";
SP_MESSAGES['ENTER_SITE_TITLE']="Please enter a Site Title.";
SP_MESSAGES['ENTER_VALID_NEWS_PER_PAGE']="Please enter a valid value for News Per Page.";
SP_MESSAGES['CHANGE_SITE_PROPERTIES']="The changes made in Site Properties require updating of all pages in your site. This operation may take several minutes, depending on the number of pages.\r\n\r\n"+
"If you are not sure you will like the changes you may choose <b>Preview</b>, and review them in Admin View first. You can then always accept or reject the changes by clicking over the Preview Mode bar in the top-right corner of the page. While in Preview Mode, you won't be able to publish any content.";
SP_MESSAGES['PUBLISH']="You are going to publish all the changes on the site "+
 "to the Normal view.\r\n\r\n"+
 "This will overwrite the current content there.\r\n\r\n"+
 "Are you sure?";
SP_MESSAGES['NO_CHANGES']="No changes will be made.";
var SIGNUP_MESSAGES=new Array();
SIGNUP_MESSAGES['ENTER_NAME']="Please enter your name";
SIGNUP_MESSAGES['ENTER_EMAIL']="Please enter your email";
SIGNUP_MESSAGES['ENTER_LOGIN']="Please enter a login";
SIGNUP_MESSAGES['ENTER_VALID_EMAIL']="Please enter a valid email";
SIGNUP_MESSAGES['ENTER_PASSWORD']="Please enter your password";
SIGNUP_MESSAGES['PASSWORDS_DONT_MATCH']="The passwords don't match. Please try again.";
SIGNUP_MESSAGES['INVALID_PHOTO_FILE']="Please browse to a valid photo image file.";
SIGNUP_MESSAGES['LOGIN_INCORRECT']="The login is incorrect. Your login may contain only:\r\n\r\n"+
 "  o Latin letters\r\n"+
 "  o Digits\r\n"+
 "  o Underscore sign (_)\r\n"+
 "  o Dash (-)\r\n"+
 "  o Dot (.)\r\n";
SIGNUP_MESSAGES['TERMS_NOT_CHECKED']="You cannot become a member without agreement\r\n"+
 "to Terms of Use and Legal statements";
function ValidEmail(email)
{
 return(email.indexOf("@")!=-1&&
 email.indexOf(".")!=-1);
}
function SignUp(dont_submit)
{
 if(!IsPageLoaded()){
 return;
}
if(!AreCookiesEnabled()){
 AlertNotEnabledCookiesMessage();
 return;
}
var form=document.SignUpForm;
form.Login.value=Trim(form.Login.value);
 form.Password.value=Trim(form.Password.value);
 form.ConfirmPassword.value=Trim(form.ConfirmPassword.value);
 form.Email.value=Trim(form.Email.value);
if(typeof(form.elements["Name"])!='undefined'){
 form.Name.value=Trim(form.Name.value);
 if(form.Name.value==''){
 alert(SIGNUP_MESSAGES['ENTER_NAME']);
 form.Name.focus();
 return false;
}
}
 if(form.Email.value==''){
 alert(SIGNUP_MESSAGES['ENTER_EMAIL']);
 form.Email.focus();
 return false;
}
if(form.Login.value==''){
 alert(SIGNUP_MESSAGES['ENTER_LOGIN']);
 form.Login.focus();
 return false;
}
if(!ValidEmail(form.Email.value)){
 alert(SIGNUP_MESSAGES['ENTER_VALID_EMAIL']);
 form.Email.select();
 return false;
}
if(form.Password.value==''){
 alert(SIGNUP_MESSAGES['ENTER_PASSWORD']);
 form.Password.focus();
 return false;
}
if(form.Password.value!=form.ConfirmPassword.value){
 alert(SIGNUP_MESSAGES['PASSWORDS_DONT_MATCH']);
 form.ConfirmPassword.value="";
 form.Password.select();
 return false;
}
if(!IsValid(form.Login.value,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.-')){
 alert(SIGNUP_MESSAGES['LOGIN_INCORRECT']);
 form.Login.focus();
 return false;
}
if(form.Photo&&form.Photo.value!=''){
function CheckFileExtension(sFileSrc,arrAllowedExtensions){
var sFileExt=GetFileExtension(sFileSrc);
 sFileExt=sFileExt.toLowerCase();
for(var i=0;i < arrAllowedExtensions.length;i++){
 if(sFileExt==arrAllowedExtensions[i].toLowerCase()){
 return true;
}
}
return false;
}
function GetFileExtension(sFileSrc){
var re=new RegExp(".*\\.(.*)$","ig");
 var _tmp=re.exec(sFileSrc);
 var sExt=RegExp.$1;
return sExt;
}
 if(!CheckFileExtension(form.Photo.value,["gif","jpg","jpeg","png","bmp"])){
 alert(SIGNUP_MESSAGES['INVALID_PHOTO_FILE']);
 form.Photo.focus();
 return false;
}
}
if(!form.IAgree.checked){
 alert(SIGNUP_MESSAGES['TERMS_NOT_CHECKED']);
 return false;
}
if(typeof(form.elements["do_sign_up_request"])!='undefined')
 form.do_sign_up_request.value="go";
var oSubmitButton=document.getElementById('sign_up_submit_button');
 if(oSubmitButton!=null){
 oSubmitButton.disabled=true;
}
if(!dont_submit)
 form.submit();
return true;
}
function SetRegisteredUserCookie(){
var expire_date=new Date()
 expire_date.setFullYear(2020,1,1);
SetCookie('Registered__User',1,expire_date);
}
function DoActivate()
{
 var form=document.ActivationForm;
form.submit();
}

var TOOLTIP_LAYER_NAME='TooltipLayer';
var HIDE_TOOLTIP_LAYER_TIMEOUT=1000*60;
var TOOLTIP_LAYER_OFFSET=10;
var TOOLTIP_LAYER_WIDTH=257;
var TOOLTIP_LAYER_HEIGHT=50;
var TOOLTIP_LAYER_CORNER_WIDTH=7;
var TOOLTIP_LAYER_CORNER_HEIGHT=7;
var tooltip_timer_handle=null;
var _TOOLTIP_IS_ALREADY_SHOWN=false;
var _LAST_SHOWN_TOOLTIP_KEY="";
var _TOOLTIP_GLOBAL_LOCK=false;
var _CURRENT_TOOLTIP_OBJ=null;
var _CURRENT_TOOLTIP_WIDTH='';
var _CURRENT_TOOLTIP_HEIGHT='';
var _CURRENT_TOOLTIP_TOP_OFFSET='';
var _CURRENT_TOOLTIP_LEFT_OFFSET='';
function ShowTooltip(obj,key,_width,_height,_top_offset,_left_offset,fixed_left_position,fixed_top_postion)
{
 if(typeof(obj)=='undefined'||
 typeof(TOOLTIPS)=='undefined'||
 typeof(TOOLTIPS[key])=='undefined')
 return;
if(typeof(_top_offset)=='undefined'||_top_offset==''){
 _top_offset=0;
}
if(typeof(_left_offset)=='undefined'||_left_offset==''){
 _left_offset=0;
}
if(_TOOLTIP_GLOBAL_LOCK){
 _CURRENT_TOOLTIP_OBJ=obj;
 _CURRENT_TOOLTIP_WIDTH=_width;
 _CURRENT_TOOLTIP_HEIGH=_height;
 _CURRENT_TOOLTIP_TOP_OFFSET=_top_offset;
 _CURRENT_TOOLTIP_LEFT_OFFSET=_left_offset;
 var str='ShowTooltip( _CURRENT_TOOLTIP_OBJ, \''+key+'\', _CURRENT_TOOLTIP_WIDTH, _CURRENT_TOOLTIP_HEIGHT, _CURRENT_TOOLTIP_TOP_OFFSET, _CURRENT_TOOLTIP_LEFT_OFFSET );';
 window.setTimeout(str,10);
 return;
}
var top_offset=_top_offset;
 var left_offset=_left_offset;
 var layer=new Layer(TOOLTIP_LAYER_NAME);
 var width=typeof(_width)=='undefined'||!_width?TOOLTIP_LAYER_WIDTH : _width;
 var height=typeof(_height)=='undefined'||!_height?TOOLTIP_LAYER_HEIGHT : _height;
layer.SetVisible(false);
if(tooltip_timer_handle){
 window.clearTimeout(tooltip_timer_handle);
 tooltip_timer_handle=null;
}
if(!layer)return;
var tooltip=TOOLTIPS[key];
if(typeof(NO_ESCAPE[key])=='undefined'||!NO_ESCAPE[key]){
 tooltip=tooltip.replace( /&/g, "&amp;" );
 tooltip=tooltip.replace( /\"/g, "&#34;" );
 tooltip=tooltip.replace( /</g, "&lt;" );
 tooltip=tooltip.replace( />/g, "&gt;" );
}
tooltip=tooltip.replace( /\r/g, "" );
 tooltip=tooltip.replace( /\n/g, "<br>" );
var tooltip_html='<table cellspacing=0 cellpadding=0 border=0 width=768px>'+
 '<tr><td width=2><img src="' + SPACE + '" width=3 height=1></td>'+
 '<td class=tooltip width=99%>'+tooltip+'</td>'+
 '<td width=2><img src="' + SPACE + '" width=2 height=1></td>'+
 '<td valign=top><a onclick="javascript:HideTooltip( )">'+
 '<img src="' + TOOLTIP_CLOSE + '" border=0 width=13 height=13></a></td></tr>'+
 '<tr><td width=2 colspan=4><img src="' + SPACE + '" width=1 height=2></td></tr>'+
 '</table>';
var code='<table cellspacing=0 cellpadding=0 border=0 width='+width+'>'+
 '<tr>'+
 '<td width='+TOOLTIP_LAYER_CORNER_WIDTH+' height='+TOOLTIP_LAYER_CORNER_HEIGHT+'>'+
 '<img src="' + TOOLTIP_TOP_LEFT + '" width='+TOOLTIP_LAYER_CORNER_WIDTH+' height='+TOOLTIP_LAYER_CORNER_HEIGHT+'>'+
 '</td>'+
 '<td class=tooltip width='+(width-2*TOOLTIP_LAYER_CORNER_WIDTH)+' ><img src="' + SPACE + '" width='+width+' height=7></td>'+
 '<td width='+TOOLTIP_LAYER_CORNER_WIDTH+' height='+TOOLTIP_LAYER_CORNER_HEIGHT+'>'+
 '<img src="' + TOOLTIP_TOP_RIGHT + '" width='+TOOLTIP_LAYER_CORNER_WIDTH+' height='+TOOLTIP_LAYER_CORNER_HEIGHT+'>'+
 '</td>'+
 '</tr>'+
 '<tr>'+
 '<td width='+TOOLTIP_LAYER_CORNER_WIDTH+' class=tooltip><img src="' + SPACE + '" width='+TOOLTIP_LAYER_CORNER_WIDTH+' height=7></td>'+
 '<td class=tooltip>'+tooltip_html+'</td>'+
 '<td width='+TOOLTIP_LAYER_CORNER_WIDTH+' class=tooltip><img src="' + SPACE + '" width='+TOOLTIP_LAYER_CORNER_WIDTH+' height=7></td>'+
 '</tr>'+
 '<tr>'+
 '<td width='+TOOLTIP_LAYER_CORNER_WIDTH+' height='+TOOLTIP_LAYER_CORNER_HEIGHT+'>'+
 '<img src="' + TOOLTIP_BOTTOM_LEFT + '" width='+TOOLTIP_LAYER_CORNER_WIDTH+' height='+TOOLTIP_LAYER_CORNER_HEIGHT+'>'+
 '</td>'+
 '<td class=tooltip width='+(width-2*TOOLTIP_LAYER_CORNER_WIDTH)+' ><img src="' + SPACE + '" width='+width+' height=7></td>'+
 '<td width='+TOOLTIP_LAYER_CORNER_WIDTH+' height='+TOOLTIP_LAYER_CORNER_HEIGHT+'>'+
 '<img src="' + TOOLTIP_BOTTOM_RIGHT + '" width='+TOOLTIP_LAYER_CORNER_WIDTH+' height='+TOOLTIP_LAYER_CORNER_HEIGHT+'>'+
 '</td>'+
 '</tr>'+
 '</table>';
layer.SetDimentions(_width,_height);
 layer.HTML(code);
var left=0;
 var top=0;
if(obj!=null){
 if(!document.getElementById){
 left=window.pageXOffset;
 top=window.pageYOffset;
}else{
 var obj_position=GetObjectAbsolutePosition(obj);
 if(!document.all){
left=obj_position.left+obj.offsetWidth+TOOLTIP_LAYER_OFFSET;
 top=obj_position.top-obj.offsetHeight;
}else{
left=obj_position.left+obj.clientWidth+TOOLTIP_LAYER_OFFSET;
 top=obj_position.top-obj.clientHeight;
}
}
}
if(fixed_left_position){
 left=fixed_left_position;
}
if(fixed_top_postion){
 top=fixed_top_postion;
}
if(left+width > layer.DocumentWidth){
 left=layer.DocumentWidth-width;
}
if(left < 0){
 left=0;
}
layer.SetPosition(left+left_offset,top+top_offset);
layer.SetDisplay(true);
 layer.SetVisible(true);
_TOOLTIP_IS_ALREADY_SHOWN=true;
 _LAST_SHOWN_TOOLTIP_KEY=key;
tooltip_timer_handle=window.setTimeout('HideTooltip();',HIDE_TOOLTIP_LAYER_TIMEOUT);
}
function HideTooltip()
{
 _TOOLTIP_GLOBAL_LOCK=true;
 window.setTimeout('var l=new Layer( TOOLTIP_LAYER_NAME );l.SetVisible( false );l.SetDisplay( false );_TOOLTIP_GLOBAL_LOCK=false;',100);
if(tooltip_timer_handle)
 window.clearTimeout(tooltip_timer_handle);
tooltip_timer_handle=false;
_TOOLTIP_IS_ALREADY_SHOWN=false;
}
function GetObjectAbsolutePosition(obj)
{
 var pos=new Object();
 pos.left=0;
 pos.top=0;
if(!obj||typeof(obj)=='undefined'||typeof(obj.offsetLeft)=='undefined')
 return pos;
if(obj.nodeName!="DIV"&&
 obj.nodeName!="TR"&&
 obj.nodeName!="CENTER"&&
 obj.nodeName!="P"){
 pos.left=obj.offsetLeft;
 pos.top=obj.offsetTop;
}
var parent_pos=GetObjectAbsolutePosition(obj.parentNode);
if(obj.parentNode&&
 typeof(obj.parentNode)!='undefined'&&
 typeof(obj.parentNode.children)!='undefined'){
 for(var i=0;i < obj.parentNode.children.length;i++){
 if(obj.parentNode.children.sourceIndex >=obj.sourceIndex)
 break;
if(obj.parentNode.children[i].nodeName=="IMG"&&i==0&&obj.parentNode.nodeName!="TD")
 pos.top+=obj.parentNode.children[i].offsetTop;
}
}
pos.left+=parent_pos.left;
 pos.top+=parent_pos.top;
return pos;
}
function SetHinderingObjectsVisibility(how)
{
 if(document.all){
 for(var i=0;i < document.forms.length;i++){
 for(var j=0;j < document.forms[i].elements.length;j++){
 if(document.forms[i].elements[j].nodeName.toUpperCase()=='SELECT'||
 document.forms[i].elements[j].nodeName.toUpperCase()=='IFRAME'){
 document.forms[i].elements[j].style.display=how?"block" : "none";
}
}
}
}
}

