	// This javascript function is for ajax star rating
function RatingRequest(data, target, url) {
	new Ajax.Updater(target, url, {method:'get', parameters: data });
}

var Num=0;
var stopflag=0;
var status = sequence = new Array();

	// This javascript function is to start the rollover thumbs
function Start(str,div) {	
	status[div] = 1;
	newArray = str.split(',');
	cnt = newArray.length;
	var first = 1;
	
	for(var j=0;j<cnt;j++) { 
		sequence[j] = new Image();
		loadpic(newArray[j],j); 
	}
	slideshow(0,div,cnt);
}

	// For image roll over process
function loadpic(url,j) {
	if(status) {
		sequence[j].src = url;
	}
}

	// For image roll over process
function slideshow(i,div,cnt) {
	if(status[div]) {
		if(i == cnt) {
			i = 0;
		}
	document.getElementById(div).src=sequence[i].src;
	i++;
	setTimeout("slideshow("+i+",'"+div+"','"+cnt+"')",550);
	}
}


	// This javascript function is to stop the rollover thumbs
function Stop(div) {
	status[div]=0;
}


	// This javascript function will bookmark this url
function AddBookmark(title, url) {
	if (window.sidebar) {
		window.sidebar.addPanel(title, url,"");
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
	return true;
	}
}


	// This javascript function will prompt upon deletion
function ConfirmDelete(url) {
	var msg = confirm("Are You Sure? Click (OK) to Continue");
	if (msg == true) {
			window.location=url;
	};
}

	// This javascript function is for sending event to the player
function sendEvent(swf,typ,prm) { 
	thisMovie(swf).sendEvent(typ,prm);
	$('adsroll').hide();
};

	// This javascript function check the current state of the video player
function getUpdate(typ,pr1,pr2,swf) {
	
	if (typ == 'state') {
		if (pr1 == 0) {
			$('adsroll').show();
		}
	}
	/*
	if(typ == 'time') {
		if (pr2 == 1) {
			$('adsroll').show();
			$('play').hide();
			$('replay').show();
		}
	}
	*/
};

	// These ff javascript function in this API are those for runtime playlist manipulation
function getLength(swf) { var len = thisMovie(swf).getLength(); };
function addItem(swf,obj,idx) { thisMovie(swf).addItem(obj,idx); };
function removeItem(swf,idx) { thisMovie(swf).removeItem(idx); };
function itemData(swf,idx) { var obj = thisMovie(swf).itemData(idx); };

	// This javascript function is a general purpose one, needed to connect to the SWF
function thisMovie(swf) {
	if(navigator.appName.indexOf("Microsoft") != -1) {
		return window[swf];
	} else {
		return document[swf];
	}
};


	// This javascript function will hide and show the selected id
function ShowOrHide(type, proc, show, hide) {
	var procId = $(proc);
	if(procId.options[procId.selectedIndex].value == '1') {
		$(show).show();
		$(hide).hide();
	} else {
		$(hide).show();
		$(show).hide();
	}
}