/* -- Adobe GoLive JavaScript Library */

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImagesArray(array) {
	if (preloadFlag == true) {
		var d = document;
		var img;	
		for (var i=0; i<array.length; i+=2) {
			img = null; 
			var n = array[i];
			if (d.images) {img = d.images[n];}
			if (!img && d.getElementById) {img = d.getElementById(n);}
			if (img) {img.src = array[i+1];}
		}
	}
}

function changeImages() {
	changeImagesArray(changeImages.arguments);
}

//Sticky Hide and Show Start
function SaveOnDemand(pThis){
	var get = new htmldb_Get(null,html_GetElement('pFlowId').value,'APPLICATION_PROCESS=GUI_COLLECTION_show_hide',0);
	get.add('P_SHOW_HIDE_REGIONS',html_GetElement('pFlowId').value+']'+'0'+']'+pThis);
	gReturn = get.get();
	get = null;
	return
}

function $r_ToggleAndSave(pThis,pId){
 htmldb_ToggleWithImage(pThis,pId+'body');
 SaveOnDemand(pId);
 return
}
//Sticky Hide and Show End

function swapImage(pThis){
    pThis = $x(pThis);
    if(html_CheckImageSrc(pThis,'_out.')){
     pThis.src = html_replace(pThis.src,'_out.','_in.');
    }else{
     pThis.src = html_replace(pThis.src,'_in.','_out.');
    }
    return;
}

