function getElementsByBaseTagClass(_1,_2,_3){
var _4=new RegExp("\\b"+_3+"\\b");
var _5=_1.getElementsByTagName(_2);
var _6=[];
for(var i=0;i<_5.length;i++){
if(_4.test(_5[i].className)){
_6.push(_5[i]);
}
}
return _6;
}
function SubmitForm(_8,_9){
if(_8){
_8.act.value=_9;
_8.submit();
}
}
function SubmitCmm(_a,_b,_c){
var _d=eval("document."+_a);
if(_b=="delBkItem"){
if(!confirm("Would you like to remove this booking item from your travel basket?")){
return;
}
}
_d.cmm.value=_b;
if(_c&&_d.param){
_d.param.value=_c;
}
_d.submit();
}
function AddComboOption(){
var _e=document.createElement("OPTION");
_e.text=arguments[1];
_e.value=arguments[2];
if(arguments.length==4&&arguments[3]){
_e.selected=true;
}
e=arguments[0];
if(Browser.is_ie){
e.add(_e);
}else{
e.add(_e,null);
}
}
function dropImg(id,_10){
for(i=0;i<_10.length;i++){
if(i!=id){
_10[i].style.display="none";
}
}
_10[id].style.display="block";
}
function highlight(id,_12){
for(i=0;i<_12.length;i++){
if(i!=id){
_12[i].className="normalmg";
}
}
_12[id].className="activeImg";
}
function ReadMore(id){
var _14=document.getElementById(id+"_next");
_14.style.display="inline";
var _15=document.getElementById(id+"_a");
_15.style.display="none";
}
function ShowContent(_16){
var _17=document.getElementById(_16);
var _18=document.getElementById("lnk_"+_16);
if(document.getElementById("img_"+_16)!=null){
var _19=document.getElementById("img_"+_16);
}
if(_17.style.display=="none"){
_17.style.display="block";
if(document.getElementById("img_"+_16)!=null){
_19.src="/_en/images/icon_h3_show.gif";
}
if(_18){
_18.className="linkArr";
}
}else{
_17.style.display="none";
if(document.getElementById("img_"+_16)!=null){
_19.src="/_en/images/icon_h3_hide.gif";
}
if(_18){
_18.className="activeArr";
}
}
}
function LoadImages(_1a,_1b,_1c){
for(var i=0;i<_1a.length;i++){
var img=document.images[_1c+_1a[i]];
if(img){
if(_1b[i]&&_1b[i]!=""){
img.src=sxPrefix+_1b[i];
}else{
img.src="/_en/images/no_photo.gif";
}
}
}
}

var Browser={init:function(){
var _1=navigator.userAgent.toLowerCase();
this.is_major=parseInt(navigator.appVersion);
this.is_minor=parseFloat(navigator.appVersion);
this.is_nav=((_1.indexOf("mozilla")!=-1)&&(_1.indexOf("spoofer")==-1)&&(_1.indexOf("compatible")==-1)&&(_1.indexOf("opera")==-1)&&(_1.indexOf("webtv")==-1)&&(_1.indexOf("hotjava")==-1));
this.is_nav2=(this.is_nav&&(this.is_major==2));
this.is_nav3=(this.is_nav&&(this.is_major==3));
this.is_nav4=(this.is_nav&&(this.is_major==4));
this.is_nav4up=(this.is_nav&&(this.is_major>=4));
this.is_navonly=(this.is_nav&&((_1.indexOf(";nav")!=-1)||(_1.indexOf("; nav")!=-1)));
this.is_nav6=(this.is_nav&&(this.is_major==5));
this.is_nav6up=(this.is_nav&&(this.is_major>=5));
this.is_gecko=(_1.indexOf("gecko")!=-1);
this.is_ie=((_1.indexOf("msie")!=-1)&&(_1.indexOf("opera")==-1));
this.is_ie3=(this.is_ie&&(this.is_major<4));
this.is_ie4=(this.is_ie&&(this.is_major==4)&&(_1.indexOf("msie 4")!=-1));
this.is_ie4up=(this.is_ie&&(this.is_major>=4));
this.is_ie5=(this.is_ie&&(this.is_major==4)&&(_1.indexOf("msie 5.0")!=-1));
this.is_ie5_5=(this.is_ie&&(this.is_major==4)&&(_1.indexOf("msie 5.5")!=-1));
this.is_ie5up=(this.is_ie&&!this.is_ie3&&!this.is_ie4);
this.is_ie5_5up=(this.is_ie&&!this.is_ie3&&!this.is_ie4&&!this.is_ie5);
this.is_ie6=(this.is_ie&&(this.is_major==4)&&(_1.indexOf("msie 6.")!=-1));
this.is_ie6up=(this.is_ie&&!this.is_ie3&&!this.is_ie4&&!this.is_ie5&&!this.is_ie5_5);
this.is_aol=(_1.indexOf("aol")!=-1);
this.is_aol3=(this.is_aol&&this.is_ie3);
this.is_aol4=(this.is_aol&&this.is_ie4);
this.is_aol5=(_1.indexOf("aol 5")!=-1);
this.is_aol6=(_1.indexOf("aol 6")!=-1);
this.is_opera=(_1.indexOf("opera")!=-1);
this.is_opera2=(_1.indexOf("opera 2")!=-1||_1.indexOf("opera/2")!=-1);
this.is_opera3=(_1.indexOf("opera 3")!=-1||_1.indexOf("opera/3")!=-1);
this.is_opera4=(_1.indexOf("opera 4")!=-1||_1.indexOf("opera/4")!=-1);
this.is_opera5=(_1.indexOf("opera 5")!=-1||_1.indexOf("opera/5")!=-1);
this.is_opera5up=(this.is_opera&&!this.is_opera2&&!this.is_opera3&&!this.is_opera4);
this.is_webtv=(_1.indexOf("webtv")!=-1);
this.is_TVNavigator=((_1.indexOf("navio")!=-1)||(_1.indexOf("navio_aoltv")!=-1));
this.is_AOLTV=this.is_TVNavigator;
this.is_hotjava=(_1.indexOf("hotjava")!=-1);
this.is_hotjava3=(this.is_hotjava&&(is_major==3));
this.is_hotjava3up=(this.is_hotjava&&(is_major>=3));
this.is_js=0;
if(this.is_nav2||this.is_ie3){
this.is_js=1;
}else{
if(this.is_nav3){
this.is_js=1.1;
}else{
if(this.is_opera5up){
this.is_js=1.3;
}else{
if(this.is_opera){
this.is_js=1.1;
}else{
if((this.is_nav4&&(this.is_minor<=4.05))||this.is_ie4){
this.is_js=1.2;
}else{
if((this.is_nav4&&(this.is_minor>4.05))||this.is_ie5){
this.is_js=1.3;
}else{
if(this.is_hotjava3up){
this.is_js=1.4;
}else{
if(this.is_nav6||this.is_gecko){
this.is_js=1.5;
}else{
if(this.is_nav6up){
this.is_js=1.5;
}else{
if(this.is_ie5up){
this.is_js=1.3;
}
}
}
}
}
}
}
}
}
}
}};
Browser.init();
function CompareDate(_2,_3,_4){
_4=(typeof _4=="undefined")?0:_4;
var _5=(_4==1)?1:0;
var _6=new Array();
_6[0]=/^\d{1,2}(\-|\/|\.|\s)\d{1,2}(\-|\/|\.|\s)\d+$/;
_6[1]=/^\d{1,2}(\-|\/|\.|\s)\d{1,2}(\-|\/|\.|\s)\d+$/;
if(_2.search(_6[_5])==-1||_3.search(_6[_5])==-1){
return 0;
}
var _7=(_2.indexOf("-")!=-1)?"-":(_2.indexOf("/")!=-1)?"/":(_2.indexOf(".")!=-1)?".":(_2.indexOf(" ")!=-1)?" ":"";
var _8=(_3.indexOf("-")!=-1)?"-":(_3.indexOf("/")!=-1)?"/":(_3.indexOf(".")!=-1)?".":(_3.indexOf(" ")!=-1)?" ":"";
if(_7==""||_8==""){
return 0;
}
var _9=_2.split(_7);
var _a=_3.split(_8);
if(_9.length!=3||_a.length!=3){
return 0;
}
if(_5==1){
var _b=_9[2];
var _c=_a[2];
var _d=_9[0];
var _e=_a[0];
var _f=_9[1];
var _10=_a[1];
}else{
var _11=_9[2];
var _12=_a[2];
var _13=_9[1];
var _14=_a[1];
var _15=_9[0];
var _16=_a[0];
}
if(CompareNumber(_11,_12)!=3){
return CompareNumber(_11,_12);
}
if(CompareNumber(_13,_14)!=3){
return CompareNumber(_13,_14);
}
if(CompareNumber(_15,_16)!=3){
return CompareNumber(_15,_16);
}
return 3;
}
function CompareNumber(_17,_18){
if(parseFloat(_17)>parseFloat(_18)){
return 1;
}else{
if(parseFloat(_17)<parseFloat(_18)){
return 2;
}else{
return 3;
}
}
}
function OpenPage(_19){
window.document.location.href=_19;
}
function OpenNew(_19){
nw=window.open(_19,"subwin","status,menubar,location,resizable,scrollbars,toolbar,height=400,width=600");
nw.focus();
}
function SetCookie(_1a,_1b,_1c){
_1c=(typeof _1c=="undefined")?7:_1c;
var _1d=new Date();
_1d.setTime(_1d.getTime()+(_1c*24*60*60*1000));
var _1e="; expires="+_1d.toGMTString();
document.cookie=_1a+"="+_1b+_1e+"; path=/";
}
function EventRegister(_1f,_20,_21){
if(_1f.attachEvent){
_1f.attachEvent("on"+_20,_21);
}else{
if(_1f.addEventListener){
_1f.addEventListener(_20,_21,false);
}else{
alert("event register failed !");
}
}
}
function GetObjectById(_22){
if(document.getElementById&&document.getElementById(_22)){
return document.getElementById(_22);
}else{
if(document.all&&document.all(_22)){
return document.all(_22);
}else{
return false;
}
}
}
function GetElementsByBaseTagClass(_23,tag,_25){
var _26=new RegExp("\\b"+_25+"\\b");
var _27=_23.getElementsByTagName(tag);
var _28=[];
for(var i=0;i<_27.length;i++){
if(_26.test(_27[i].className)){
_28.push(_27[i]);
}
}
return _28;
}
function GetLayerStyle(_2a){
if(document.getElementById&&document.getElementById(_2a)){
return document.getElementById(_2a).style;
}else{
if(document.all&&document.all(_2a)){
return document.all(_2a).style;
}else{
if(document.layers&&document.layers[_2a]){
return document.layers[_2a];
}else{
return false;
}
}
}
}
function ChangeObjectVisibility(_2b,_2c){
var _2d=GetLayerStyle(_2b);
if(_2d){
if(_2c){
_2d.display="block";
}else{
_2d.display="none";
}
return true;
}else{
return false;
}
}
function ShowError(_2e){
var _2f=GetObjectById("error");
if(_2f){
_2f.innerHTML=_2e;
ChangeObjectVisibility("error",true);
}
}
function ShowMessage(_30){
var _31=GetObjectById("error");
if(_31){
_31.innerHTML="<span class='style1'>"+_30+"</span>";
ChangeObjectVisibility("error",true);
}
}
function GetKeycode(e){
if(window.event){
return e.keyCode;
}else{
if(e.which){
return e.which;
}else{
return -1;
}
}
}
var popPhotoWin=null;
function ShowFullSize(_33,_34,_35){
var x=(screen.width-560)/2;
var url="/view_photo?obj_type="+_34+"&obj_id="+_33+"&site_id="+_35;
if(popPhotoWin==null||popPhotoWin.closed){
popPhotoWin=window.open(url,"","status = false, menubar = false, width = 200, height=200, scrollbars = false, resizable = true, center = true, left="+x);
}else{
popPhotoWin.location.href=url;
}
}
var popWin=null;
function Popup(uri,width,height){
width=(width)?width:680;
height=(height)?height:420;
var x = (screen.width - width)/2;
if(popWin == null || popWin.closed) {
popWin = window.open(uri, "", "width="+width+",height="+height+",scrollbars,resizable,center,left="+x)
}else{popWin.location.href=uri;}
}
function InitDestination(){
var frm=document.frmDestination;
if(frm==null){
return;
}
curCountry=(typeof curCountry=="undefined")?"":curCountry;
var _39=0;
for(var i=0;i<arrWhlCountry.length;i++){
if(arrWhlCountry[i]==curCountry){
_39=i+1;
}
AddComboOption(frm.country,arrWhlCountry[i],i+1);
}
if(_39>0){
frm.country.selectedIndex=_39;
OnSelCountry(frm.country);
}
}
function OnSelCountry(elm){
var frm=document.frmDestination;
var len=frm.destination.options.length;
for(var i=0;i<len-1;i++){
frm.destination.remove(1);
}
if((elm.selectedIndex==-1)||(elm.selectedIndex==0)||(arrWhlCity[elm.selectedIndex-1]==null)){
frm.destination.disabled=true;
return;
}else{
frm.destination.disabled=false;
}
for(var i=0;i<arrWhlCity[elm.selectedIndex-1].length;i++){
AddComboOption(frm.destination,arrWhlCity[elm.selectedIndex-1][i],i);
}
}
function OpenDestination(){
var frm=document.frmDestination;
var cnt=frm.country;
var des=frm.destination;
var url="";
if(cnt.selectedIndex==-1||cnt.selectedIndex==0){
return;
}
if(des.disabled||des.selectedIndex==0||des.selectedIndex==-1){
url=arrWhlCountryUrl[cnt.selectedIndex-1];
}else{
url=arrWhlCityUrl[cnt.selectedIndex-1][des.selectedIndex-1];
}
frm.action=url;
frm.submit();
}
function SendThisPage(){
var uri = window.location.pathname;
var title = document.title;
Popup("/sendpage?uri="+uri+"&page_title="+title,600,590);
}
function MM_preloadImages(){
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;i<a.length;i++){
if(a[i].indexOf("#")!=0){
d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];
}
}
}
}
function SlideRun(){
var _3=rand(sldImages.length-1);
var _4=sldPrefix+sldImages[_3];
if(document.all){
document.images.main_img.style.filter="blendTrans(Duration=1)";
document.images.main_img.filters.blendTrans.Apply();
}
document.images.main_img.src=_4;
if(document.all){
document.images.main_img.filters.blendTrans.Play();
}
setTimeout("SlideRun()",5000);
}
function SlidePreload(){
for(i=0;i<sldImages.length;i++){
MM_preloadImages(sldPrefix+sldImages[i]);
}
}
function rand(_5){
return Math.round(Math.random()*_5);
}
function SlideInit(){
if (!document.images.main_img){
return;
}
if(sldImages.length<=1){
return;
}
SlidePreload();
setTimeout("SlideRun()",5000);
}
function SBInit(){
var _1=document.AccmSearch;
var _2=document.TourSearch;
for(var i=0;i<arrWhlCountry.length;i++){
AddComboOption(_1.sb_country_accm,arrWhlCountry[i],i);
AddComboOption(_2.sb_country_tour,arrWhlCountry[i],i);
}
}
function SearchInit(){
var _f1 = document.AccmSearch;
var _f2 = document.TourSearch;
if (_f1.sb_check_in && _f1.sb_check_out){
Calendar.setup({inputField:"sb_check_in", ifFormat:"%d/%m/%Y", showsTime:false, 
timeFormat:"24", button:"sb_btn_check_in", singleClick:true, step:1, disableFunc:CheckInDate});
Calendar.setup({inputField:"sb_check_out", ifFormat:"%d/%m/%Y", showsTime:false, 
timeFormat:"24", button:"sb_btn_check_out", singleClick:true, step:1, disableFunc:CheckOutDate});
}
if (_f2.sb_starting){
Calendar.setup({inputField:"sb_starting", ifFormat:"%d/%m/%Y", showsTime:false, 
timeFormat:"24", button:"sb_btn_starting", singleClick:true, step:1});
}
}
function CheckInDate(iDate){
    var iDateTS=parseInt(iDate.getTime()/1000);
    var strDate = '';
    //--not allow select past days
    var d = new Date() 
    strDate += ((d.getMonth() + 1) < 10 ? "0" + (d.getMonth() + 1) : (d.getMonth() + 1)) + "/";
    strDate += (d.getDate() < 10 ? "0" + d.getDate() : d.getDate()) + "/";
    strDate += d.getFullYear();
    var CheckIn = parseInt(((Date.parse(strDate)/1000))-((Date.parse(strDate)/1000)%86400));
    if (iDateTS<CheckIn) return(true);
    return(false);
}
function CheckOutDate(iDate){
    var _f1 = document.AccmSearch;
    var iDateTS  = parseInt(iDate.getTime()/1000);
    var strInput = _f1.sb_check_in.value;
    var arrayDate = strInput.split("/");
    var strDate = arrayDate[1]+"/"+arrayDate[0]+"/"+arrayDate[2]+" 23:31:30";
    var CheckOut = parseInt(((Date.parse(strDate)/1000))-((Date.parse(strDate)/1000)%86400));
    if (iDateTS < CheckOut) return(true);
    return(false);
}
function FindAccommodation(){
ChangeObjectVisibility("search_accm",true);
ChangeObjectVisibility("search_tour",false);
SetCookie("search_state","accm");
}
function FindTours(){
ChangeObjectVisibility("search_accm",false);
ChangeObjectVisibility("search_tour",true);
SetCookie("search_state","tour");
}
function ShowHideAccmAdvSearch(_4){
ChangeObjectVisibility("search_accm_adv",_4);
ChangeObjectVisibility("search_accm_adv_hide",!_4);
ChangeObjectVisibility("search_accm_adv_show",_4);
var _5=document.AccmSearch;
SetCookie("search_showadv",(_4?"1":"0"));
}
function SBOnSelCountry(_6,_7){
var _8=document.AccmSearch;
var _9=document.TourSearch;
var _a=_8.sb_city_accm.options.length;
for(var i=0;i<_a-1;i++){
_8.sb_city_accm.remove(1);
_9.sb_city_tour.remove(1);
}
if(_7=="accm"){
_9.sb_country_tour.selectedIndex=_6.selectedIndex;
}else{
_8.sb_country_accm.selectedIndex=_6.selectedIndex;
}
if(_6.selectedIndex==-1||_6.selectedIndex==0||arrWhlCity[_6.selectedIndex-1].length==0||(arrWhlCity[_6.selectedIndex-1].length==1&&arrWhlCity[_6.selectedIndex-1][0]=="-")){
_8.sb_city_accm.disabled=true;
_9.sb_city_tour.disabled=true;
return;
}
for(var i=0;i<arrWhlCity[_6.selectedIndex-1].length;i++){
_8.sb_city_accm.disabled=false;
_9.sb_city_tour.disabled=false;
AddComboOption(_8.sb_city_accm,arrWhlCity[_6.selectedIndex-1][i],i);
AddComboOption(_9.sb_city_tour,arrWhlCity[_6.selectedIndex-1][i],i);
}
}
function SBOnSelCity(_d,_e){
var _f=document.AccmSearch;
var _10=document.TourSearch;
if(_e=="accm"){
_10.sb_city_tour.selectedIndex=_d.selectedIndex;
}else{
_f.sb_city_accm.selectedIndex=_d.selectedIndex;
}
}
function SBGetValueCheckAccm(_11){
var frm=document.AccmSearch;
var _13="";
var _14=0;
for(i=0;i<frm.elements.length;i++){
if((frm.elements[i].name!=(_11+"[]"))&&(frm.elements[i].name!=_11)){
continue;
}
elm=frm.elements[i];
if(elm.checked){
if(_14<3){
if(_13!=""){
_13+=", ";
}
_13+=frm.elements[_11+"_name_"+elm.value].value;
_14++;
}else{
_13+=" ..";
break;
}
}
}
GetObjectById(_11+"_list").innerHTML=_13;
if(_14==1){
ChangeObjectVisibility(_11+"_list",true);
}
if(_14==0){
ChangeObjectVisibility(_11+"_list",false);
}
}
function SBGetValueCheckTour(_15){
var frm=document.TourSearch;
var _17="";
var _18=0;
for(i=0;i<frm.elements.length;i++){
if(frm.elements[i].name!=(_15+"[]")){
continue;
}
elm=frm.elements[i];
if(elm.checked){
if(_18<3){
if(_17!=""){
_17+=", ";
}
_17+=frm.elements[_15+"_name_"+elm.value].value;
_18++;
}else{
_17+=" ..";
break;
}
}
}
GetObjectById(_15+"_list").innerHTML=_17;
if(_18==1){
ChangeObjectVisibility(_15+"_list",true);
}
if(_18==0){
ChangeObjectVisibility(_15+"_list",false);
}
}
var xSBTownUpdated=false;
function SBOnDestChange(elm){
frm=document.AccmSearch;
if(!frm||!elm){
return (false);
}
xSBTownUpdated=false;
}
function SBShowTown(evt){
buttonMouseover(evt,"menu1");
if(xSBTownUpdated){
return (true);
}
frm=document.AccmSearch;
if(!frm){
return (false);
}
var _1b=frm.sb_destination.options[frm.sb_destination.selectedIndex].value;
if(_1b==0){
return (false);
}
var _1c=GetObjectById("menu1");
if(!_1c){
return (false);
}
_1c.innerHTML="Please wait ..";
var x=(window.ActiveXObject)?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();
if(x){
x.onreadystatechange=function(){
if(x.readyState==4&&x.status==200){
var _1e=GetObjectById("menu1");
if(!_1e){
return (false);
}
_1e.innerHTML=x.responseText;
}
};
x.open("GET","utils?act=get_town&dest_id="+_1b,true);
x.setRequestHeader("Cache-Control","no-cache");
x.setRequestHeader("If-Modified-Since","Sat, 1 Jan 2000 00:00:00 GMT");
x.send(null);
}
xSBTownUpdated=true;
}
function SubmitAccmSearch(){
frm=document.AccmSearch;
if(!frm){
return;
}
if(CompareDate(frm.sb_check_in.value,frm.sb_check_out.value)==1){
alert("The check-in date must be smaller than the check-out date");
return (false);
}else{
if (frm.sb_destination){
var val=frm.sb_destination.options[frm.sb_destination.selectedIndex].value;
var arr=val.match(/^(.*)\|(.*)$/);
if (arr && arr.length==3){
frm.site.value=arr[1];
frm.city.value=arr[2];
} else return;
}
frm.submit();
}
}
function SubmitTourSearch(){
frm=document.TourSearch;
if(!frm){
return;
}
frm.submit();
}
function UncheckElements(_1f){
for(var k=0;k<_1f.length;k++){
var elm=document.getElementsByName(_1f[k]);
for(var i=0;i<elm.length;i++){
elm[i].checked=false;
}
}
}
function ResetSearchBox(_23){
frm=document.AccmSearch;
frm.sb_accm_type.selectedIndex=0;
frm.sb_accm_category.selectedIndex=0;
frm.sb_free_text_accm.value="";
if(_23=="dest"){
ChangeObjectVisibility("sb_site_location_list",false);
ChangeObjectVisibility("sb_attr_point_list",false);
ChangeObjectVisibility("sb_accm_theme_list",false);
var _24=new Array("radLocation","sb_site_location[]","sb_attr_point","sb_accm_theme[]");
UncheckElements(_24);
}else{
var _25=new Array("sb_site_location[]");
UncheckElements(_25);
ChangeObjectVisibility("sb_site_location_list",false);
}
frm=document.TourSearch;
frm.sb_cbDuration.selectedIndex=0;
frm.sb_free_text_tour.value="";
if(_23=="dest"){
ChangeObjectVisibility("sb_tour_theme_list",false);
var _26=new Array("sb_tour_theme[]");
UncheckElements(_26);
}
SetCookie("search_reset","1");
}

var niftyOk=(document.getElementById&&document.createElement&&Array.prototype.push);
var niftyCss=true;
String.prototype.find=function(_1){
return (this.indexOf(_1)>=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(){
return;
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(_3,_4){
if(niftyOk==false){
return;
}
if(niftyCss==false){
AddCss();
}
var i,v=_3.split(","),h=0;
if(_4==null){
_4="";
}
if(_4.find("fixed-height")){
h=getElementsBySelector(v[0])[0].offsetHeight;
}
for(i=0;i<v.length;i++){
Rounded(v[i],_4);
}
if(_4.find("height")){
SameHeight(_3,h);
}
}
function Rounded(_6,_7){
var i,top="",bottom="",v=new Array();
if(_7!=""){
_7=_7.replace("left","tl bl");
_7=_7.replace("right","tr br");
_7=_7.replace("top","tr tl");
_7=_7.replace("bottom","br bl");
_7=_7.replace("transparent","alias");
if(_7.find("tl")){
top="both";
if(!_7.find("tr")){
top="left";
}
}else{
if(_7.find("tr")){
top="right";
}
}
if(_7.find("bl")){
bottom="both";
if(!_7.find("br")){
bottom="left";
}
}else{
if(_7.find("br")){
bottom="right";
}
}
}
if(top==""&&bottom==""&&!_7.find("none")){
top="both";
bottom="both";
}
v=getElementsBySelector(_6);
for(i=0;i<v.length;i++){
FixIE(v[i]);
if(top!=""){
AddTop(v[i],top,_7);
}
if(bottom!=""){
AddBottom(v[i],bottom,_7);
}
}
}
function AddTop(el,_a,_b){
var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(_b.find("alias")||(color=getBk(el))=="transparent"){
color="transparent";
bk="transparent";
border=getParentBk(el);
btype="t";
}else{
bk=getParentBk(el);
border=Mix(color,bk);
}
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Top");
if(_b.find("small")){
d.style.marginBottom=(p-2)+"px";
btype+="s";
lim=2;
}else{
if(_b.find("big")){
d.style.marginBottom=(p-10)+"px";
btype+="b";
lim=8;
}else{
d.style.marginBottom=(p-5)+"px";
}
}
for(i=1;i<=lim;i++){
d.appendChild(CreateStrip(i,_a,color,border,btype));
}
el.style.paddingTop="0";
el.insertBefore(d,el.firstChild);
}
function AddBottom(el,_e,_f){
var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(_f.find("alias")||(color=getBk(el))=="transparent"){
color="transparent";
bk="transparent";
border=getParentBk(el);
btype="t";
}else{
bk=getParentBk(el);
border=Mix(color,bk);
}
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Bottom");
if(_f.find("small")){
d.style.marginTop=(p-2)+"px";
btype+="s";
lim=2;
}else{
if(_f.find("big")){
d.style.marginTop=(p-10)+"px";
btype+="b";
lim=8;
}else{
d.style.marginTop=(p-5)+"px";
}
}
for(i=lim;i>0;i--){
d.appendChild(CreateStrip(i,_e,color,border,btype));
}
el.style.paddingBottom=0;
el.appendChild(d);
}
function CreateStrip(_11,_12,_13,_14,_15){
var x=CreateEl("b");
x.className=_15+_11;
x.style.backgroundColor=_13;
x.style.borderColor=_14;
if(_12=="left"){
x.style.borderRightWidth="0";
x.style.marginRight="0";
}else{
if(_12=="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(_19,_1a){
var i,v=_19.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>_1a){
_1a=els[i].offsetHeight;
}
els[i].style.height="auto";
}
for(i=0;i<els.length;i++){
gap=_1a-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(_1c){
var i,j,selid="",selclass="",tag=_1c,tag2="",v2,k,f,a,s=[],objlist=[],c;
if(_1c.find("#")){
if(_1c.find(" ")){
s=_1c.split(" ");
var fs=s[0].split("#");
if(fs.length==1){
return (objlist);
}
f=document.getElementById(fs[1]);
if(f){
v=f.getElementsByTagName(s[1]);
for(i=0;i<v.length;i++){
objlist.push(v[i]);
}
}
return (objlist);
}else{
s=_1c.split("#");
tag=s[0];
selid=s[1];
if(selid!=""){
f=document.getElementById(selid);
if(f){
objlist.push(f);
}
return (objlist);
}
}
}
if(_1c.find(".")){
s=_1c.split(".");
tag=s[0];
selclass=s[1];
if(selclass.find(" ")){
s=selclass.split(" ");
selclass=s[0];
tag2=s[1];
}
}
var v=document.getElementsByTagName(tag);
if(selclass==""){
for(i=0;i<v.length;i++){
objlist.push(v[i]);
}
return (objlist);
}
for(i=0;i<v.length;i++){
c=v[i].className.split(" ");
for(j=0;j<c.length;j++){
if(c[j]==selclass){
if(tag2==""){
objlist.push(v[i]);
}else{
v2=v[i].getElementsByTagName(tag2);
for(k=0;k<v2.length;k++){
objlist.push(v2[k]);
}
}
}
}
}
return (objlist);
}
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,_25){
var p=getStyleProp(x,"padding"+_25);
if(p==null||!p.find("px")){
return (0);
}
return (parseInt(p));
}
function getStyleProp(x,_28){
if(x.currentStyle){
return (x.currentStyle[_28]);
}
if(document.defaultView.getComputedStyle){
return (document.defaultView.getComputedStyle(x,"")[_28]);
}
return (null);
}
function rgb2hex(_29){
var hex="",v,h,i;
var _2b=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;
var h=_2b.exec(_29);
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,step1,step2,x,y,r=new Array(3);
if(c1.length==4){
step1=1;
}else{
step1=2;
}
if(c2.length==4){
step2=1;
}else{
step2=2;
}
for(i=0;i<3;i++){
x=parseInt(c1.substr(1+step1*i,step1),16);
if(step1==1){
x=16*x+x;
}
y=parseInt(c2.substr(1+step2*i,step2),16);
if(step2==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 activex=((navigator.userAgent.indexOf("Win")!=-1)&&(navigator.userAgent.indexOf("MSIE")!=-1)&&(parseInt(navigator.appVersion)>=4));
var CantDetect=((navigator.userAgent.indexOf("Safari")!=-1)||(navigator.userAgent.indexOf("Opera")!=-1));
function oopsPopup(){
if((navigator.language&&navigator.language.indexOf("ja")!=-1)||(navigator.systemLanguage&&navigator.systemLanguage.indexOf("ja")!=-1)||(navigator.userLanguage&&navigator.userLanguage.indexOf("ja")!=-1)){
var _1="http://download.skype.com/share/skypebuttons/oops/oops_ja.html";
}else{
var _2="http://download.skype.com/share/skypebuttons/oops/oops.html";
}
var _3="oops";
var _4=540,popH=305;
var _5="no";
w=screen.availWidth;
h=screen.availHeight;
var _6=(w-_4)/2,topPos=(h-popH)/2;
oopswindow=window.open(_2,_3,"width="+_4+",height="+popH+",scrollbars="+_5+",screenx="+_6+",screeny="+topPos+",top="+topPos+",left="+_6);
return false;
}
if(typeof (detected)=="undefined"&&activex){
document.write(["<script language=\"VBscript\">","Function isSkypeInstalled()","on error resume next","Set oSkype = CreateObject(\"Skype.Detection\")","isSkypeInstalled = IsObject(oSkype)","Set oSkype = nothing","End Function","</script>"].join("\n"));
}
function skypeCheck(){
if(CantDetect){
return true;
}else{
if(!activex){
var _7=navigator.mimeTypes["application/x-skype"];
detected=true;
if(typeof (_7)=="object"){
return true;
}else{
return oopsPopup();
}
}else{
if(isSkypeInstalled()){
detected=true;
return true;
}
}
}
detected=true;
return oopsPopup();
}
function loadDetection(){
if(document.getElementById&&document.getElementsByTagName){
if(window.addEventListener){
window.addEventListener("load",addDetection,false);
}else{
if(window.attachEvent){
window.attachEvent("onload",addDetection);
}
}
}
}
function addDetection(){
var _8=document.getElementsByTagName("a");
for(var i=0;i<_8.length;i++){
if(_8[i].childNodes[0]&&_8[i].childNodes[0].src){
if((_8[i].childNodes[0].src.indexOf("download.skype.com/share/skypebuttons")!=-1||_8[i].childNodes[0].src.indexOf("mystatus.skype.com")!=-1)&&(typeof (_8[i].onclick)=="undefined"||_8[i].onclick==null)){
_8[i].onclick=function sChk(){
return skypeCheck();
};
}
}
}
}
var activeButton=null;
function buttonClick(_1,_2){
var _3;
if(Browser.is_ie){
_3=window.event.srcElement;
}else{
_3=_1.currentTarget;
}
_3.blur();
if(_3.menu==null){
_3.menu=document.getElementById(_2);
if(_3.menu.isInitialized==null){
menuInit(_3.menu);
}
}
if(_3.onmouseout==null){
_3.onmouseout=buttonOrMenuMouseout;
}
if(_3==activeButton){
return false;
}
if(activeButton!=null){
resetButton(activeButton);
}
if(_3!=activeButton){
depressButton(_3);
activeButton=_3;
}else{
activeButton=null;
}
return false;
}
function buttonMouseover(_4,_5){
var _6;
if(activeButton==null){
buttonClick(_4,_5);
return;
}
if(Browser.is_ie){
_6=window.event.srcElement;
}else{
_6=_4.currentTarget;
}
if(activeButton!=null&&activeButton!=_6){
buttonClick(_4,_5);
}
}
function depressButton(_7){
var x,y;
_7.className+=" menuButtonActive";
if(_7.onmouseout==null){
_7.onmouseout=buttonOrMenuMouseout;
}
if(_7.menu.onmouseout==null){
_7.menu.onmouseout=buttonOrMenuMouseout;
}
x=getPageOffsetLeft(_7);
y=getPageOffsetTop(_7)+_7.offsetHeight;
if(Browser.is_ie){
x+=_7.offsetParent.clientLeft;
y+=_7.offsetParent.clientTop;
}
_7.menu.style.left=x+"px";
_7.menu.style.top=y+"px";
_7.menu.style.visibility="visible";
if(_7.menu.iframeEl!=null){
_7.menu.iframeEl.style.left=_7.menu.style.left;
_7.menu.iframeEl.style.top=_7.menu.style.top;
_7.menu.iframeEl.style.width=_7.menu.offsetWidth+"px";
_7.menu.iframeEl.style.height=_7.menu.offsetHeight+"px";
_7.menu.iframeEl.style.display="";
}
}
function resetButton(_9){
removeClassName(_9,"menuButtonActive");
if(_9.menu!=null){
closeSubMenu(_9.menu);
_9.menu.style.visibility="hidden";
if(_9.menu.iframeEl!=null){
_9.menu.iframeEl.style.display="none";
}
}
}
function menuMouseover(_a){
var _b;
if(Browser.is_ie){
_b=getContainerWith(window.event.srcElement,"DIV","menu");
}else{
_b=_a.currentTarget;
}
if(_b.activeItem!=null){
closeSubMenu(_b);
}
}
function menuItemMouseover(_c,_d){
var _e,menu,x,y;
if(Browser.is_ie){
_e=getContainerWith(window.event.srcElement,"A","menuItem");
}else{
_e=_c.currentTarget;
}
menu=getContainerWith(_e,"DIV","menu");
if(menu.activeItem!=null){
closeSubMenu(menu);
}
menu.activeItem=_e;
_e.className+=" menuItemHighlight";
if(_e.subMenu==null){
_e.subMenu=document.getElementById(_d);
if(_e.subMenu.isInitialized==null){
menuInit(_e.subMenu);
}
}
if(_e.subMenu.onmouseout==null){
_e.subMenu.onmouseout=buttonOrMenuMouseout;
}
x=getPageOffsetLeft(_e)+_e.offsetWidth;
y=getPageOffsetTop(_e);
var _f,maxY;
if(Browser.is_ie){
_f=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft)+(document.documentElement.clientWidth!=0?document.documentElement.clientWidth:document.body.clientWidth);
maxY=Math.max(document.documentElement.scrollTop,document.body.scrollTop)+(document.documentElement.clientHeight!=0?document.documentElement.clientHeight:document.body.clientHeight);
}
if(Browser.is_opera){
_f=document.documentElement.scrollLeft+window.innerWidth;
maxY=document.documentElement.scrollTop+window.innerHeight;
}
if(Browser.is_nav){
_f=window.scrollX+window.innerWidth;
maxY=window.scrollY+window.innerHeight;
}
_f-=_e.subMenu.offsetWidth;
maxY-=_e.subMenu.offsetHeight;
if(x>_f){
x=Math.max(0,x-_e.offsetWidth-_e.subMenu.offsetWidth+(menu.offsetWidth-_e.offsetWidth));
}
y=Math.max(0,Math.min(y,maxY));
_e.subMenu.style.left=x+"px";
_e.subMenu.style.top=y+"px";
_e.subMenu.style.visibility="visible";
if(_e.subMenu.iframeEl!=null){
_e.subMenu.iframeEl.style.left=_e.subMenu.style.left;
_e.subMenu.iframeEl.style.top=_e.subMenu.style.top;
_e.subMenu.iframeEl.style.width=_e.subMenu.offsetWidth+"px";
_e.subMenu.iframeEl.style.height=_e.subMenu.offsetHeight+"px";
_e.subMenu.iframeEl.style.display="";
}
if(Browser.is_ie){
window.event.cancelBubble=true;
}else{
_c.stopPropagation();
}
}
function closeSubMenu(_10){
if(_10==null||_10.activeItem==null){
return;
}
if(_10.activeItem.subMenu!=null){
closeSubMenu(_10.activeItem.subMenu);
_10.activeItem.subMenu.style.visibility="hidden";
if(_10.activeItem.subMenu.iframeEl!=null){
_10.activeItem.subMenu.iframeEl.style.display="none";
}
_10.activeItem.subMenu=null;
}
removeClassName(_10.activeItem,"menuItemHighlight");
_10.activeItem=null;
}
function buttonOrMenuMouseout(_11){
var el;
if(activeButton==null){
return;
}
if(Browser.is_ie){
el=window.event.toElement;
}else{
if(_11.relatedTarget!=null){
el=(_11.relatedTarget.tagName?_11.relatedTarget:_11.relatedTarget.parentNode);
}
}
if(getContainerWith(el,"DIV","menu")==null){
resetButton(activeButton);
activeButton=null;
}
}
function menuInit(_13){
var _14,spanList;
var _15,arrowEl;
var _16;
var w,dw;
var i,j;
if(Browser.is_ie){
_13.style.lineHeight="2.5ex";
spanList=_13.getElementsByTagName("SPAN");
for(i=0;i<spanList.length;i++){
if(hasClassName(spanList[i],"menuItemArrow")){
spanList[i].style.fontFamily="Webdings";
spanList[i].firstChild.nodeValue="4";
}
}
}
_14=_13.getElementsByTagName("A");
if(_14.length>0){
_16=_14[0].offsetWidth;
}else{
return;
}
for(i=0;i<_14.length;i++){
spanList=_14[i].getElementsByTagName("SPAN");
_15=null;
arrowEl=null;
for(j=0;j<spanList.length;j++){
if(hasClassName(spanList[j],"menuItemText")){
_15=spanList[j];
}
if(hasClassName(spanList[j],"menuItemArrow")){
arrowEl=spanList[j];
}
}
if(_15!=null&&arrowEl!=null){
_15.style.paddingRight=(_16-(_15.offsetWidth+arrowEl.offsetWidth))+"px";
if(Browser.is_opera){
arrowEl.style.marginRight="0px";
}
}
}
if(Browser.is_ie){
w=_14[0].offsetWidth;
_14[0].style.width=w+"px";
dw=_14[0].offsetWidth-w;
w-=dw;
_14[0].style.width=w+"px";
}
if(Browser.is_ie){
var _19=document.createElement("IFRAME");
_19.frameBorder=0;
_19.src="javascript:false;";
_19.style.display="none";
_19.style.position="absolute";
_19.style.filter="progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
_13.iframeEl=_13.parentNode.insertBefore(_19,_13);
}
_13.isInitialized=true;
}
function getContainerWith(_1a,_1b,_1c){
while(_1a!=null){
if(_1a.tagName!=null&&_1a.tagName==_1b&&hasClassName(_1a,_1c)){
return _1a;
}
_1a=_1a.parentNode;
}
return _1a;
}
function hasClassName(el,_1e){
var i,list;
list=el.className.split(" ");
for(i=0;i<list.length;i++){
if(list[i]==_1e){
return true;
}
}
return false;
}
function removeClassName(el,_21){
var i,curList,newList;
if(el.className==null){
return;
}
newList=new Array();
curList=el.className.split(" ");
for(i=0;i<curList.length;i++){
if(curList[i]!=_21){
newList.push(curList[i]);
}
}
el.className=newList.join(" ");
}
function getPageOffsetLeft(el){
var x;
x=el.offsetLeft;
if(el.offsetParent!=null){
x+=getPageOffsetLeft(el.offsetParent);
}
return x;
}
function getPageOffsetTop(el){
var y;
y=el.offsetTop;
if(el.offsetParent!=null){
y+=getPageOffsetTop(el.offsetParent);
}
return y;
}


