function calc_general_textarea_height(obj){
	var number_of_ch = 50;
	var len = document.getElementById(obj).value.length;
	var height = len / number_of_ch;
	document.getElementById(obj).rows = height+countLines(obj);
}

function edit_user_password(){
	document.getElementById('password_view1').style.display='';
	document.getElementById('password_view2').style.display='';
	document.getElementById('password_view3').style.display='';
	document.getElementById('edit_password').style.display='none';
	document.getElementById('cancel_edit_password').style.display='';
}
function cancel_edit_user_password(){
	document.getElementById('password_view1').style.display='none';
	document.getElementById('password_view2').style.display='none';
	document.getElementById('password_view3').style.display='none';
	document.getElementById('edit_password').style.display='';
	document.getElementById('cancel_edit_password').style.display='none';
}
function show_albums_folder(obj){
	if(document.getElementById(obj).style.display==''){		
		document.getElementById(obj).style.display='none';
	}
	else{	
		document.getElementById(obj).style.display='';
	}
	return false;
}

function initSlideShow() {
	var preLoad = new Array();
	for (var i = 0; i < arrBanner.length; i++) {
	preLoad[i] = new Image();
	preLoad[i].src = arrBanner[i];
	}
	var rndId = Math.floor(Math.random()*arrBanner.length);
	document.write('<img src="'+arrBanner[rndId]+'" name="SlideShow" id="SlideShow" width="206" height="140" />');
	window.setInterval('runSlideShow()', slideShowSpeed);
} // initSlideShow.
	
function runSlideShow(){
	rndId = Math.floor(Math.random()*arrBanner.length);
	if (document.all){
	document.images.SlideShow.style.filter = "blendTrans(duration=2)";
	document.images.SlideShow.style.filter = "blendTrans(duration=crossFadeDuration)";
	document.images.SlideShow.filters.blendTrans.Apply() ;
	}
	document.images.SlideShow.src = arrBanner[rndId];
	if (document.all){
	document.images.SlideShow.filters.blendTrans.Play();
	}
} // runSlideShow.

function CreateBookmarkLink() {

 title = "סוויטות נטלי באילת"; 
  // Blogger - Replace with <$BlogItemTitle$> 
  // MovableType - Replace with <$MTEntryTitle$>

 url = "http://www.sNatali.co.il/";
  // Blogger - Replace with <$BlogItemPermalinkURL$> 
  // MovableType - Replace with <$MTEntryPermalink$>
  // WordPress - <?php bloginfo('url'); ?>

	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); }
	else if(window.opera && window.print) { // Opera Hotlist
		return true; }
}
