function uploaderStatusChanged( uploader ) { 
	
	if (uploader.isReady()) {	 
		JHL.ReLoadForJumpLoader();
	} 
} 

JHL = function(){
	var CarrousselOver = false;
	var Form; //for validation of a form, the form object is stored here
	var elementCount; //counts the validated form elements in validation
	this.Url; //for jumploader and form update
	
	return{
		StrEmpty: function(str){
			return ((String(str).toLowerCase() == "false") || (String(str).toLowerCase() == "undefined") || (str == "") || (String(str).toLowerCase() == String(null)));
		},
		openArchiveHistory : function(id){
			var v = $("#"+id);
			
			var h = document[v.attr("formid")]["History" + v.attr("formid")];
			for(var i=0; i<h.length; i++){

				if(h[i].value != v.val()){
					$("#his"+h[i].value).css("display","none");	
				}else{
					$("#his"+h[i].value).css("display","block");	
				}	
			}
		},
		popupSideMenu : function(id, clicked){
			var d = $("#side" + id);
			switch(id){
				case "com":
					var idname = "community";
					break;
				case "ses":
					var idname = "kitesession";
					break;	
				case "pol":
					var idname = "poll";
					break;
				case "sec":
					var idname = "secondhand";
					break;
				case "whois":
					var idname = "whoisonline";
					break;
				case "new":
					var idname = "news";
					break;
				case "spo":
					var idname = "kitespot";
					break;	
				case "gea":
					var idname = "gear";
					break;		
			}
	
			if(!JHL.StrEmpty(clicked)){
				
				//document.location = '/setside/?pagecode=' + id + '&value=0&q=' + Math.random()
				if(d.hasClass("Display-true")){
					d.attr('class', 'Display-false');	
					d.innerHTML = "loading..."
					
					$("#button-" + id).attr('class','small-icon-1');
					
					$.ajax({
						url: '/setside/?pagecode=' + id + '&value='
					});	
				}else{
					d.attr('class', 'Display-true');
					$("#button-" + id).attr('class', 'small-icon-0')

					$('#side' + id).load('/' + idname + '/side/');
					
					$.ajax({
						url: '/setside/?pagecode=' + id + '&value=1'
					});	
				}
			}else{
				if(JHL["LoginIs" + id]){
					d.attr('class', 'Display-true');
					$("#button-" + id).attr('class','small-icon-0');
					$('#side' + id).load('/' + idname + '/side/');
				}else{
					d.attr('class', 'Display-false');
					$("#button-" + id).attr('class','small-icon-1');
					d.innerHTML = "loading..."
				}
			}
		},
		ReLoadForJumpLoader: function(){
			window.location.href = this.Url; 
		},
		
		Carroussel: function(v){
			if(!CarrousselOver){
				var counter = $("#CarrouselCounter").attr("value");
				
				for(var i=1; i<=counter;i++){
					if(i == v){
						$("#CarrouselDiv" + i).css('display', 'block');
						$("#CarrouselTab" + i).attr('class', 'Carrousel-Tab-block');	
					}else{
						$("#CarrouselDiv" + i).css('display', 'none');	
						$("#CarrouselTab" + i).attr('class', 'Carrousel-Tab-none');	
					}	
				}
				v++;
				v > counter ? v = 1 : '';
				if(!CarrousselOver){
					
				}
			}
			
			window.setTimeout("JHL.Carroussel(" + v + ")", 10000);
		}, 
		
		CarrousselIn : function(v){
			CarrousselOver = true;
			var counter = $("#CarrouselCounter").attr("value");
			for(var i=1; i<=counter;i++){
				if(i == v){
					$("#CarrouselDiv" + i).css('display', 'block');	
					$("#CarrouselTab" + i).attr('class', 'Carrousel-Tab-block');	
				}else{
					$("#CarrouselDiv" + i).css('display', 'none');
					$("#CarrouselTab" + i).attr('class', 'Carrousel-Tab-none');	
				}	
			}

			
		},

		
		CarrousselOut : function(v){
			CarrousselOver = false;			
		},
		
		reportAbuse: function(url, itemid){
			
			var str = '<form name="AbuseForm" style="background-color:#f0f6fb;">';
				str += '<table>';
					str += '<tr>';
						str += '<td>';
							str += '<input type="hidden" id="AbuseURL" name="AbuseURL" value="' + url + '" />';
							str += strAbuseText
						str += '</td>';
					str += '</tr>';
					str += '<tr>';
						str += '<td>';
							str += '<span widget="true" class="button-icon-empty" id="iconAbuse">&nbsp;</span>';
							str += '<span widget="true" class="wrong" id="WrongAbuse"></span><br/>';
							str += '<textarea id="AbuseRemark" name="AbuseRemark" code="ReqText" style="width:480px; height:100px; border:1px solid black;"></textarea>';
						str += '</td>';
					str += '</tr>';
					str += '<tr>';
						str += '<td style="text-align:right;">';
							str += '<a class="light-button" href="javascript:HL.sendAbuse(' + "'" + itemid + "'" + ')">';
								str += '<span class="Btn-icon btn-i-true">&nbsp;</span>';
								str += strReportAbuse;
							str += '</a>';
						str += '</td>';
					str += '</tr>';
				str += '</table>';
			str += '</form>';
			
			
			var $dialog = $('<div>sdf</div>');
			$dialog
				.dialog({
					title: strReportAbuseTitle,
					modal: true,
					width: 500,
					height: 300
				});
				
			$dialog.dialog('open');
			/*
			$.window({
			   showModal: true,
			   modalOpacity: 0.5,
			   title: strReportAbuseTitle,
			   content: str,
			   width:500,
				height:260
			});
			*/
			/*
			windowI = new Ext.Window({
				id: 'Abuse',
				frame: true,
				border: true,
				title: strReportAbuseTitle,
				width:500,
				height:260,
				border: false,
				modal: true,
				closeAction: 'close',
				html: str
				
			});
			
			
			windowI.show(document);
			*/
		},
		
		openTab: function(id, isAjax){
			var a = $(".Tab");
			for(var i=0; i<a.length;i++){
				$("#Div-" + a[i].id).css('display', 'none');
				$("#"+a[i].id).removeClass("Tab-true");
			}
			
			
			$("#Div-Tab-" + id).css('display', 'block');
			$("#Tab-" + id).addClass("Tab-true");
			
			if(isAjax){
				if(id == 'sessions'){
					$("#Div-Tab-" + id).load("/kitesession/editfront/");
				}else{
					$("#Div-Tab-" + id).load("/kitespot/" + id + "/frontpage/data/");
				}
				
			}
		},
		setRemark: function(f){
			if(f.myTextArea){
				var v = f.myTextArea.value;
				
				var reg = new RegExp('rel="nofollow"', 'g');
				v = v.replace(reg, '');
				var reg = new RegExp('rel=nofollow', 'g');
				v = v.replace(reg, '');
				var reg = new RegExp('target="_blank"', 'g');
				v = v.replace(reg, '');
				var reg = new RegExp('target=_blank', 'g');
				v = v.replace(reg, '');

				//check all <a> tags and put it rel="nofollow"
				var reg = new RegExp('(<a )[^>]*href\\s*=\\s*"[^"]*"[^>]*>', 'gi');
		
				try{
					var tags = v.match(reg);
					for(var i=0; i<tags.length; i++){
						v = v.replace(RegExp.$1, '<a&nbsp;rel="nofollow" target="_blank" ');
					}
				}catch(g){}
				//f.Remark.value = encodeURI(v);
				f.Remark.value = (v);
			}else{
				try{
					f.Remark.value = CKEDITOR.instances.Remark.getData()
				}
				catch(e){}
			}
		},
		checkEmptyValue : function(str){
			//checked of een str ook echt niet leeg is.
			//een string is niet leeg als er echte text in staat
			//wel leeg als er alleen maar spaties in staan bijvoorbeeld
			str = unescape(str);
			var reg = new RegExp(' ', 'gi');
			str = str.replace(reg, '');
			var reg = new RegExp('&nbsp;', 'gi');
			str = str.replace(reg, '');
			var reg = new RegExp('null', 'gi');
			str = str.replace(reg, '');
			
			var reg = new RegExp("<p>", "g");
			str = str.replace(reg, "")
			var reg = new RegExp("<\/p>", "g")
			str = str.replace(reg, "")
			var reg = new RegExp("\/n", "g")
			str = str.replace(reg, "")
			return str;
		},
		CheckLoadingData: function(e){
			if(JHL.StrEmpty(this.data)){
				setTimeout(JHL.CheckLoadingData, 1000); 
			}

				$("#Title").attr("value", this.data[0].title);
				$("#VideoEmbedSmallThumb").attr("value", this.data[0].thumbnail_small);
				$("#VideoEmbedLargeThumb").attr("value", this.data[0].thumbnail_medium);
			
		
				JHL.SubmitForm({ShowMask:1});
				JHL.SetValidationCSS($("#VideoEmbed"), 1);
				icon.addClass("btn-i-true");
				//$("#iconVideoEmbed").className = "Btn-icon btn-i-true";
				$("#WrongVideoEmbed").innerHTML = '';	

		},
		SetValidationCSS : function(e, b){
				var cssreg = new RegExp ("-false", "g");
				if(!b){
					e.className = e.className.replace(cssreg,"");
					e.className += "-false";
				}else{
					e.className = e.className.replace(cssreg,"");
				}
		},
		getFormParameters: function(){
			
			var str = {};
			for(i=0; i<this.Form.elements.length; i++){
				var e = this.Form.elements[i];
				if(e.type == 'radio' || e.type == 'checkbox'){
					
					if(e.checked || e.selected){
						str[e.name] = e.value;	
					}
				}else{
					str[e.name] = e.value;
				}
				
				//alert(e.name + ':' + e.value)

			}

			
			return str;
			
		
		},
		SubmitForm: function(att){
			//jumploader: als 1 = alleen return true; niet submitten.
			//url: deze url
			this.elementCount ++;
			
			
			//alert(this.elementCount + ':' + this.Form.elements.length + '-' + att.name)
			if(this.elementCount >= this.Form.elements.length && att.ShowMask){

				$('<div id="dialog">'+strSaving+'</div>').appendTo('body');  
				$('#dialog').dialog({
						title: strSavingYourData,
						modal: true,
						width: 200,
						height: 75,
						 close: function(event, ui) {
                                $("#dialog").remove();
                                }
					});
					
				 $('#dialog').dialog('open'); 
			}

			if(this.elementCount >= this.Form.elements.length && att.jumploader){
				//als er fotos zijn geupload dan een andere submit dan met fotos
					//first edit the data
					//when data is edited, then upload the images.
					
					//check first if the minumupload quota is met.
					att.noSubmit = 1;
					//if(document.JUpload.getUploader().getFileCount() > 0){
						$.ajax({
							url: this.Form.getAttribute('action') + '?IsApplet=1',
							data: this.getFormParameters(),
							type: "POST",
							 success: function(result){
				
								var str = String(result).split(",")
								JHL.Url = str[1];
								try{
									document.JUpload.getUploaderConfig().setUploadUrl(String(JHL.DomainUrl + str[0]))
									if(document.JUpload.getUploader().getFileCount() > 0){
										document.JUpload.getUploader().startUpload();
									}else{
										window.location.href = str[1];
									}
								}
								catch(e){
										window.location.href = str[1];
								}
							 }
						});
						
						
						/*
						Ext.Ajax.request({
							url: this.Form.action + '?IsApplet=1',
							params: this.getFormParameters(),
							success: function ( result, request ) { 
								var str = String(result.responseText).split(",")
								JHL.Url = str[1];
								try{
									document.JUpload.getUploaderConfig().setUploadUrl(String(HL.DomainUrl + str[0]))
									if(document.JUpload.getUploader().getFileCount() > 0){
										document.JUpload.getUploader().startUpload();
									}else{
										window.location.href = str[1];
									}
								}
								catch(e){
										window.location.href = str[1];
								}
							}
						});
					//}else{
						//this.Form.submit()	
					//}
					*/
					


				
			}	
			
			
			
			if(this.elementCount >= this.Form.elements.length && !att.noSubmit){
				this.Form.submit()	
			}else{
				
			}
		},
		Validation: function(form, att){
			JHL.StrEmpty(att)? att = {} : '';
			this.elementCount = 0;

			this.Form = document[form];
	
			for(i=0; i<this.Form.elements.length; i++){
				var e = this.Form.elements[i];
				att.name = e.name
				var code = e.getAttribute("code");
				var icon = $("#icon" + e.name);
				var wrongtxt = $("#Wrong" + e.name);
				
				switch(code){
					case "NonReqEmbedText":
							var VideoEmbedId = $("#VideoEmbedId");
							var VideoEmbedTypeId = $("#VideoEmbedTypeId");
							
							//check videotype
							if(JHL.StrEmpty(e.value)){
								JHL.SubmitForm(att);
								this.SetValidationCSS(e, 1);
								icon.addClass("btn-i-true");
								//icon.className = "Btn-icon btn-i-true";
								wrongtxt.innerHTML = '';			
							}
							
							if(String(e.value).match("youtube")){
								VideoEmbedTypeId.attr("value", 1);
								var regCode = new RegExp("youtube.com\\/v\\/([^?/]*)", "g");
								regCode.exec(e.value);
								var tempvalue = RegExp.$1;
							
								VideoEmbedId.attr("value", tempvalue);
	
								
								JHL.SubmitForm(att);
								this.SetValidationCSS(e, 1);
								icon.addClass("btn-i-true");
								wrongtxt.innerHTML = '';						
							}
							if(String(e.value).match("vimeo")){
								VideoEmbedTypeId.attr("value", 2);
								var regCode = new RegExp("vimeo.com\\/video\\/([0-9]*)", "g");
								regCode.exec(e.value);
								var tempvalue = RegExp.$1;
								VideoEmbedId.attr("value", tempvalue);
								
								//get the thumb info
								var headID = document.getElementsByTagName("head")[0];         
								var newScript = document.createElement('script');
								newScript.type = 'text/javascript';
								newScript.src = 'http://vimeo.com/api/v2/video/' + tempvalue + '.json?callback=getVimeoJson';
								headID.appendChild(newScript);
								
								this.data = '';								
								getVimeoJson = function(str){
									this.data = str;									
								}
								
								if(JHL.StrEmpty(this.data)){
									setTimeout(JHL.CheckLoadingData, 1000); 
								}
							}
								
								
													 	

						break;
					case "ReqImages":
						try{
							if(att.minimumUpload > document.JUpload.getUploader().getFileCount()){
								this.SetValidationCSS(e, 0);
								icon.addClass("btn-i-false");
								wrongtxt.innerHTML = strWrongAmountOfImagesSelectedText;
							}else{
								JHL.SubmitForm(att);
								this.SetValidationCSS(e, 1);
								icon.removeClass("btn-i-false");
								wrongtxt.innerHTML = '';
							}
						}
						catch(e){
							JHL.SubmitForm(att);
						}
					
						break;
					case "ReqNoTagsArea":
						var tempvalue = this.UnTag(e.value);
						e.value = tempvalue;
						if(this.StrEmpty(tempvalue)){
							this.SetValidationCSS(e, 0);
							icon.addClass("btn-i-false");
							wrongtxt.html(strWrongReqTextAreaText);
						}else{
							JHL.SubmitForm(att);
							this.SetValidationCSS(e, 1);
							icon.removeClass("btn-i-false");
							wrongtxt.innerHTML = '';
						}
						
						break;
					case "NotReqNoTagsArea":
						var tempvalue = this.UnTag(e.value);
						e.value = tempvalue;
						JHL.SubmitForm(att);
							this.SetValidationCSS(e, 1);
							icon.removeClass("btn-i-false");
							wrongtxt.innerHTML = '';
						
						break;
					case "ReqTextAreaV3":
						var tempvalue = JHL.checkEmptyValue(CKEDITOR.instances.Remark.getData());
						if(this.StrEmpty(tempvalue)){
							this.SetValidationCSS(e, 0);
							icon.addClass("btn-i-false");
							wrongtxt.html(strWrongReqTextAreaText);
							
						}else{
							JHL.SubmitForm(att);
							this.SetValidationCSS(e, 1);
							icon.removeClass("btn-i-false");
							wrongtxt.innerHTML = '';
						}
						break;
					case "ReqLogin":
						
						var username = this.Form.LoginUserName;
						var password = this.Form.LoginPassword;
						var wrongtxt = $("#WrongLogin")
						if(this.StrEmpty(username.value) || this.StrEmpty(password.value)){
							this.SetValidationCSS(username, 0);
							this.SetValidationCSS(password, 0);
							wrongtxt.html(strWrongReqLoginText);
						}else{
							JHL.SubmitForm(att);
							this.SetValidationCSS(username, 1);
							this.SetValidationCSS(password, 1);
							wrongtxt.innerHTML = '';	
						}
						
						break;
					
					case "ReqRadio":
						var name = e.name;
						var checked = false;
						for(j=0; j<this.Form.elements.length; j++){
							if(this.Form.elements[j].name == name){
								if(this.Form.elements[j].checked == true){
									checked = true;
								}
							}
						}
						if(!checked){
							this.SetValidationCSS(e, 0);
							icon.addClass("btn-i-false");
							wrongtxt.html(strWrongNonReqRadioText);
						}else{
							JHL.SubmitForm(att);
							this.SetValidationCSS(e, 1);
							icon.removeClass("btn-i-false");
							wrongtxt.html('');
						}
							
						break;
					case "ReqDate":
						var valid = true;
						if(this.StrEmpty(e.value)){
							valid = false;
						}
						var date = new Date(e.value);
						
						
						
						
						
						//if(tempdate.getMonth() != date.getMonth()){
						//	valid = false;
						//}

						
						if(date.getYear() < 1900){
							var yyyy = date.getYear() + 1900
							if(yyyy < 1900){
								valid = false;
							}
						}
						
	

						
						if(date.getHours() > 23 || date.getHours() < 0){
							valid = false;
						}
						
						if(date.getMinutes() > 59 || date.getMinutes() < 0){
							valid = false;
						}
						

						
						if(!valid){
							
							this.SetValidationCSS(e, 0);
							icon.addClass("btn-i-false");
							wrongtxt.html(strWrongNoValidDate);
						}else{
							JHL.SubmitForm(att);
							this.SetValidationCSS(e, 1);
							icon.removeClass("btn-i-false");
							wrongtxt.html('');
						}
						
						break;
					case "ReqDropDown":

						if(this.StrEmpty(e.selectedIndex)){
							this.SetValidationCSS(e, 0);
							icon.addClass("btn-i-false");
							wrongtxt.html(strWrongReqDropDownText);
						}else{
							JHL.SubmitForm(att);
							this.SetValidationCSS(e, 1);
							icon.removeClass("btn-i-false");
							wrongtxt.html('');
						}																						 	

						break;	
					case "ReqBetweenOption":
						var start = $("#" + e.name + "Start");
						var end = $("#" + e.name + "End");
					
						if(!this.StrEmpty(start.attr('value')) && !this.StrEmpty(end.attr('value'))){
							JHL.SubmitForm(att);
							icon.removeClass("btn-i-false");
							wrongtxt.html('');
						}else{
							icon.addClass("btn-i-false");
							//wrongtxt.html(strValidateBetweenOption);
						}	
						break;
						
					case "ReqSpotSelect":	//only used for adding session
						var checked = false;
						
						if(this.Form.LocalSpotId){
							for(j=0; j<this.Form.LocalSpotId.length; j++){
								if(this.Form.LocalSpotId[j].checked == true){
									checked = true;
								}
							}
						}else{
							
						}
						var ex = $("#SpotId");
						if(!this.StrEmpty(ex.attr("Value"))){
							checked = true;
						}
		
						if(!checked){
							icon.removeClass("btn-i-true");
							icon.addClass("btn-i-false");

							wrongtxt.html(strValidateSessionSpot);
						}else{
							JHL.SubmitForm(att);
							icon.removeClass("btn-i-false");
							icon.addClass("btn-i-true");
							wrongtxt.html('');
						}
						break;	


					default:
						JHL.SubmitForm(att);
						
				}
			}


			
		},
		//kudos
		setKudo: function(id, qc, direction, pagecode){
			//check if the kudos is given to a reaction or an item
			if(qc == 'react'){
				var div = "KudoCountReact" + id;
			}else{
				var div = "KudoCountItem" + id;
			}
			
			$.ajax({
				url: '/setkudo/?itemid=' + id + '&qc=' + qc + '&direction=' + direction + '&pagecode=' + pagecode,
				type: "POST",
				 success: function(result){
					var a = String(result).split(",");
					//a[0] : text
					//a[1] : kudo number
					if(!JHL.StrEmpty(a[1])){
						var kudoColor = '0';
						if(a[1] < 0){kudoColor = '-1';}
						if(a[1] > 0){kudoColor = '1';}
						if(a[1] > 2){kudoColor = '2';}
						$("#"+div).attr("class","User-Header-Kudos-" + kudoColor);
						$("#"+div).html(a[1]);
					}else{
						alert(a[0]);
						//Ext.MessageBox.alert(strWarning, a[0]);		
					}
				  }
				
			});
			
				

			
			
		},
		
		openUserPopup: function(username, id, itemid){
			var e = $("#"+username + id);
			if(e.attr("class") == "User-Header-DropDown-false"){
				e.attr("class","User-Header-DropDown-true");
				e.html("loading...");
				
				if(JHL.StrEmpty(itemid)){
					$("#"+username + id).load('/user/' + username + '/popup/')
				}else{
					if(String(id).substr(0,4) == 'item'){
						$("#"+username + id).load('/itemarchive/?itemid=' + itemid)
					}else{
						$("#"+username + id).load('/reactarchive/?reactid=' + itemid)
					}
				}
			}else{
				e.attr("class","User-Header-DropDown-false");
				e.html("");
			}
		},
		
		GalleryChooseType: function(id, step){
			if(!JHL.StrEmpty(id)){
				$("#GalleryType").attr("value",id);
				if(id == 1){
					$("#GalleryButton-1").attr("class", "green-button");
					$("#GalleryButton-2").attr("class", "light-button");
					$("#GalleryType1").css("display", "block");
					$("#GalleryType2").css("display", "none");
				}else{
					$("#GalleryButton-1").attr("class", "light-button");
					$("#GalleryButton-2").attr("class", "green-button");
					$("#GalleryType2").css("display", "block");
					$("#GalleryType1").css("display", "none");
				}	
			}
			
			if(step == 2){
				$("#GalleryText").css("display", "block");	
			}
			
			if(step == 3){
				$("#GalleryTags").css("display", "block");	
			}
			
			if(step == 4){
				$("#SubmitBar").css("display", "block");	
			}
			
			
		},
			
		//make stars script
		RollOverStars: function(id){
			
			ratingvalue = $("#RatingId").attr("value");
				JHL.StrEmpty(ratingvalue)? ratingvalue = 0 : '';
				
			for(var i=1; i<=5; i++){
				if(i<=id){
					$("#star" + i).attr("src", "/media/icons/star-1.png")
				}else{
					if(i<=ratingvalue){
						$("#star" + i).attr("src", "/media/icons/star-2.png")
					}else{
						$("#star" + i).attr("src", "/media/icons/star-0.png")
					}
				}
			}
		},
		
		GalleryOpenImage: function(e){
			window.open(JHL.MediaBaseUrl + "large" + e.getAttribute("picUrl"), "popup");
		},
		
		GalleryShowPreview: function(e){
			
			$.ajax({
				url: '/gallery/' + e.getAttribute("itemid") + '/showimage/?picurl=' + e.getAttribute("picUrl") + '&ridername=' + e.getAttribute("RiderName") + '&photographername=' + e.getAttribute("PhotographerName"),
				type: "POST",
				 success: function(result){
						document.getElementById("largePreviewDiv").innerHTML = result;
						//$("#largePreviewDiv").innerHTML = result;
						$("#largePreviewDiv").attr("picUrl", e.getAttribute("picUrl"));
				  }
				
			});

			
			
		},
		
		makeStars: function(id){
			ratingvalue = $("#RatingId").attr("value", id);
			for(var i=1; i<=5; i++){
				if(i<=id){
					$("#star" + i).attr("src", "/media/icons/star-2.png")
				}else{
					$("#star" + i).attr("src", "/media/icons/star-0.png")
				}
			}
		},
		
		VotePoll: function(itemid, optionid){
			$("#sidepol").load(
					'/poll/' + itemid + '/vote/?isfront=1&optionid=' + optionid ,
					function(response, status, xhr) {
					  if (status == "success") {
					   $("#largePreviewDiv").attr("picUrl", e.attr("picUrl"));
					  }

					});
		},
		
		RollOutStars: function(id){
			ratingvalue = $("#RatingId").attr("value");
				JHL.StrEmpty(ratingvalue)? ratingvalue = 0 : '';
			for(var i=1; i<=5; i++){
				if(i<=ratingvalue){
					$("#star" + i).attr("src", "/media/icons/star-2.png")
				}else{
					$("#star" + i).attr("src", "/media/icons/star-0.png")
				}
			}
		}
	//end make stars script
	}
}();

HL = function(){
	return{
		Tr_RollOut: function(){

			try{
				var t = $("#rollover").remove();
				//t.parent().remove(t);
			}catch(e){}
		},
		SpamStopInit: function(){
			if(Ext.getDom('widget9')){
				try{
					Ext.get("widget9").load({
						url:	'/spamstopper/'
					});	
				}
				catch(e){}
			}
		},
		
		Tr_RollOver: function(e){
			if(String(e.className).toLowerCase() == "image-border-link"){
				var span = document.createElement("div");	
		
				span.id = "rollover"
				span.style.position = "absolute";
				span.style.width = e.offsetWidth + 2 + "px";
				//span.style.left = e.offsetLeft + "px";
				//span.style.top = e.offsetTop + "px";
				span.style.height = e.offsetHeight + 2 + "px";
				span.style.lineHeight = e.offsetHeight + 2 + "px";
				span.className = "Image-Border-Link-rollover"; 
				
				span.innerHTML = '<img src="/media/zoom.png" align="absmiddle" /> Click to Zoom';
				

				
				//e.parentNode.insertBefore(span, e); 
				span.setAttribute("src", e.getAttribute("src"));
	
				//span.onClick = function() {HL.showImage(e)} ; 
				//span.onmouseout = function() {HL.Tr_RollOut(e)} ; 
				e.insertAdjacentElement("beforeBegin",span);	


			}
		}
	}
}();
