The Identification Number and Password fields need to be filled in. Moreover, you cannot send messages devoid of contents Adding further data is not allowed because this topic has been closed Print You provided no password: you have to write it in the textfield beside the command delete for the topic you want to delete Are you sure you want to delete this comment? You did not cast a vote. You need to cast a vote by selecting a radio button. Impossible to proceed Provide the project number Insufficient form parameters: you forgot to fill in some field/s
 
member picmember pic
 
Snippets of A
 
info Below you can find the text of the snippet you want to read, and the list of the other snippets by this author if available.
What are snippets?
Share on MySpace

Part 3: Javascript Dhtml: 36 Clip And/Or Slide Layer Animations

Snippet: Identification Number »   Snippet: Inclusion syntax »
Visitors: 4,285 Tagged by its author as: Programming Javascript Characters (in origin): 37,301 (pages: ~ 13)
Author: Em@il Permalink Cast your vote for this topic Printable version
Premise (Not printed if this snippet is included)This file is a component of the following page: Javascript Dhtml: 36 Clip And/Or Slide Layer Animations and as such, in order to be understood, it should be viewed within that context, and not here.
function sliceRL(id, speed, amount, size, onExitOptionalFunction, stop1, stop1){
if(id){
id=(typeof(id)=="object")? id.id: id;
var variableName=id+"_clipper";
	if(window[variableName] && window[variableName].isRunning){return;};
	if(!id || !document.getElementById(id)){return;};
var object=window[variableName]=new Object();
object['layer']=document.getElementById(id);
object["id"]=id;
var name="sliceRL";//
object[name]=window[name];
object["last"]=name;
object.isRunning=1;
object['speed']=parseFloat(speed) || 100;
object['amount']=parseFloat(amount) || 1;
object['half']=object['amount'];///2;
object['size']=Math.abs( parseFloat(size) ) || object['layer'].offsetWidth/2;
onExitOptionalFunction=(typeof(onExitOptionalFunction)=="string")?
window[onExitOptionalFunction]:onExitOptionalFunction;
object['onExitOptionalFunction']=(typeof(onExitOptionalFunction)=="function")?
	onExitOptionalFunction:(onExitOptionalFunction/*==1*/)?
	function(object){
	document.getElementById( object.id ).style.visibility="hidden";
	object.setClip(object.originalClip);
	object.midwayOver=0;
	}
	:0;
object['stop1']=parseFloat(stop1) || 0;//object['layer'].offsetWidth;
object['stop2']=parseFloat(stop1) || 0;
object['timer']=null;
object["stop"]=function(){
	clearInterval(this.timer);
	this.isRunning=0;
	if(typeof(this.onExitOptionalFunction)=="function"){this.onExitOptionalFunction(this);};
}
object["setClip"]=
	function(array){
		if(typeof(array)=="string"){array=array.match(/\d+/g);}
	var output="rect(";
	for(var a=0; a<array.length; a++){output+=array[a]+"px, ";}
	this.layer.style.clip=output.substring(0, output.length - 2)+")";
	};
object["getClip"]=
	function(){
		if(!this.layer.style.clip){
			this.layer.style.clip=
			"rect(0px, "+ parseFloat(this.layer.offsetWidth)+"px, "+
			parseFloat(this.layer.offsetHeight) + "px, 0px)";
		};
	var clip=this.layer.style.clip.replace(/(^\s*rect\s*\()|(\)\s*$)/g,'').replace(/\s+/g," ").split(" ");
	return [parseFloat(clip[0]), parseFloat(clip[1]), parseFloat(clip[2]), parseFloat(clip[3])];
	};
object['layer'].style.position="absolute";
object['layer'].style.visibility="visible";
object["originalTop"]=object['layer'].offsetTop;
object["originalLeft"]=object['layer'].offsetLeft;
object['originalClip']=object.getClip();
object['top']=object['originalClip'][0];
object['right']=object['originalClip'][1];
object['bottom']=object['originalClip'][2];
object['left']=object['layer'].offsetWidth;//object['originalClip'][3];
object.setClip([ object['top'], object['right'], object['bottom'], object['left'] ]);
object['timer']=setInterval(
	variableName+"."+name+"()", object['speed']
);
return 0;
};
//RUNTIME:
if(this.right-this.left<this.size && !this.midwayOver){/*begins*/
this.left-=(this.size-(this.right-this.left)<this.amount)?
(this.size-(this.right-this.left)):this.amount;
}
else if(this.left>this.stop1){/*core*/
var remains=(this.left-this.half<this.stop1)?
Math.abs(this.stop1-this.left):0;
this.left-=(this.left-this.half<this.stop1)?
this.left-this.stop1:this.half; 
this.right-=this.half+remains;
this.midwayOver=1;
}
else if(this.left<=this.stop1){/*ends*/
var remains=(this.left>this.stop1)?
this.left:0;
this.left-=(this.left>this.stop1)?
this.left:0;
this.right-=(this.right-this.amount<=this.stop1)?
(this.right-this.stop1)+remains:this.amount+remains;
};
	this.setClip( [this.top, this.right, this.bottom, this.left] );
//EXIT CONDITION:
if(this.left + this.right - this.stop1 <= this.stop1){ this.stop(); };
/*keep this comment to reuse freely
http://www.fullposter.com/?1 */}




function sliceLR(id, speed, amount, size, onExitOptionalFunction, stop1, stop2){
if(id){
id=(typeof(id)=="object")? id.id: id;
var variableName=id+"_clipper";
	if(window[variableName] && window[variableName].isRunning){return;};
	if(!id || !document.getElementById(id)){return;};
var object=window[variableName]=new Object();
object['layer']=document.getElementById(id);
object["id"]=id;
var name="sliceLR";//
object[name]=window[name];
object["last"]=name;
object.isRunning=1;
object['speed']=parseFloat(speed) || 100;
object['amount']=parseFloat(amount) || 1;
object['half']=object['amount'];///2;
object['size']=Math.abs( parseFloat(size) ) || object['layer'].offsetWidth/2;//
onExitOptionalFunction=(typeof(onExitOptionalFunction)=="string")?
window[onExitOptionalFunction]:onExitOptionalFunction;
object['onExitOptionalFunction']=(typeof(onExitOptionalFunction)=="function")?
	onExitOptionalFunction:(onExitOptionalFunction/*==1*/)?
	function(object){
	document.getElementById( object.id ).style.visibility="hidden";
	object.setClip(object.originalClip);
	object.midwayOver=0;
	}
	:0;
object['stop1']=parseFloat(stop1) || object['layer'].offsetWidth;
object['stop2']=parseFloat(stop2) || object['layer'].offsetHeight;
object['timer']=null;
object["stop"]=function(){
	clearInterval(this.timer);
	this.isRunning=0;
	if(typeof(this.onExitOptionalFunction)=="function"){this.onExitOptionalFunction(this);};
}
object["setClip"]=
	function(array){
		if(typeof(array)=="string"){array=array.match(/\d+/g);}
	var output="rect(";
	for(var a=0; a<array.length; a++){output+=array[a]+"px, ";}
	this.layer.style.clip=output.substring(0, output.length - 2)+")";
	};
object["getClip"]=
	function(){
		if(!this.layer.style.clip){
			this.layer.style.clip=
			"rect(0px, "+ parseFloat(this.layer.offsetWidth)+"px, "+
			parseFloat(this.layer.offsetHeight) + "px, 0px)";
		};
	var clip=this.layer.style.clip.replace(/(^\s*rect\s*\()|(\)\s*$)/g,'').replace(/\s+/g," ").split(" ");
	return [parseFloat(clip[0]), parseFloat(clip[1]), parseFloat(clip[2]), parseFloat(clip[3])];
	};
object['layer'].style.position="absolute";
object['layer'].style.visibility="visible";
object["originalTop"]=object['layer'].offsetTop;
object["originalLeft"]=object['layer'].offsetLeft;
object['originalClip']=object.getClip();
object['top']=object['originalClip'][0];
object['right']=0;//object['originalClip'][1];
object['bottom']=object['originalClip'][2];
object['left']=object['originalClip'][3];
object.setClip([ object['top'], object['right'], object['bottom'], object['left'] ]);
object['timer']=setInterval(
	variableName+"."+name+"()", object['speed']
);
return 0;
};
//RUNTIME:
if(this.right<this.size){/*begins*/
this.right+=(this.right+this.amount>this.size)?
(this.size-this.right):this.amount;
}
else if(this.right+this.half>this.stop1){/*ends*/
this.right=this.stop1;
this.left+=(this.left+this.amount>this.stop1)?
(this.stop1-this.left):this.amount;
}
else {/*core*/
this.left+=this.half;
this.right+=this.half;
};
	this.setClip( [this.top, this.right, this.bottom, this.left] );
//EXIT CONDITION:
if(this.left>=this.stop1){ this.stop(); };
/*keep this comment to reuse freely
http://www.fullposter.com/?1 */}




function psliceLR(id, speed, amount, size, onExitOptionalFunction, stop1, stop2){
if(id){
id=(typeof(id)=="object")? id.id: id;
var variableName=id+"_clipper";
	if(window[variableName] && window[variableName].isRunning){return;};
	if(!id || !document.getElementById(id)){return;};
var object=window[variableName]=new Object();
object['layer']=document.getElementById(id);
object["id"]=id;
var name="psliceLR";//
object[name]=window[name];
object["last"]=name;
object.isRunning=1;
object['speed']=parseFloat(speed) || 100;
object['amount']=parseFloat(amount) || 1;
object['half']=object['amount'];///2;
object['size']=Math.abs( parseFloat(size) ) || object['layer'].offsetWidth/2;//
onExitOptionalFunction=(typeof(onExitOptionalFunction)=="string")?
window[onExitOptionalFunction]:onExitOptionalFunction;
object['onExitOptionalFunction']=(typeof(onExitOptionalFunction)=="function")?
	onExitOptionalFunction:(onExitOptionalFunction/*==1*/)?
	function(object){
	document.getElementById( object.id ).style.visibility="hidden";
	object.setClip(object.originalClip);
	document.getElementById( object.id ).style.left=object.originalLeft;
	document.getElementById( object.id ).style.top=object.originalTop;
	object.midwayOver=0;
	}
	:0;
object['stop1']=parseFloat(stop1) || object['layer'].offsetWidth;
object['stop2']=parseFloat(stop2) || object['layer'].offsetHeight;
object['timer']=null;
object["stop"]=function(){
	clearInterval(this.timer);
	this.isRunning=0;
	if(typeof(this.onExitOptionalFunction)=="function"){this.onExitOptionalFunction(this);};
}
object["setClip"]=
	function(array){
		if(typeof(array)=="string"){array=array.match(/\d+/g);}
	var output="rect(";
	for(var a=0; a<array.length; a++){output+=array[a]+"px, ";}
	this.layer.style.clip=output.substring(0, output.length - 2)+")";
	};
object["getClip"]=
	function(){
		if(!this.layer.style.clip){
			this.layer.style.clip=
			"rect(0px, "+ parseFloat(this.layer.offsetWidth)+"px, "+
			parseFloat(this.layer.offsetHeight) + "px, 0px)";
		};
	var clip=this.layer.style.clip.replace(/(^\s*rect\s*\()|(\)\s*$)/g,'').replace(/\s+/g," ").split(" ");
	return [parseFloat(clip[0]), parseFloat(clip[1]), parseFloat(clip[2]), parseFloat(clip[3])];
	};
object['layer'].style.position="absolute";
object['layer'].style.visibility="visible";
object["originalTop"]=object['layer'].offsetTop;
object["originalLeft"]=object['layer'].offsetLeft;
object['originalClip']=object.getClip();
object['top']=object['originalClip'][0];
object['right']=0;//object['originalClip'][1];
object['bottom']=object['originalClip'][2];
object['left']=object['originalClip'][3];
object.setClip([ object['top'], object['right'], object['bottom'], object['left'] ]);
object['timer']=setInterval(
	variableName+"."+name+"()", object['speed']
);
return 0;
};
//RUNTIME:
if(this.right<this.size){/*begins*/
this.right+=(this.right+this.amount>this.size)?
(this.size-this.right):this.amount;
}
else if(this.right+this.half>this.stop1){/*ends*/
this.right=this.stop1;
var amount=(this.left+this.amount>this.stop1)?
(this.stop1-this.left):this.amount;
this.left+=amount;
}
else {/*core*/
this.left+=this.half;
this.right+=this.half;
this.layer.style.left=Math.round(this.originalLeft - this.left);
};
	this.setClip( [this.top, this.right, this.bottom, this.left] );
//EXIT CONDITION:
if(this.left>=this.stop1){ this.stop(); };
/*keep this comment to reuse freely
http://www.fullposter.com/?1 */}




function psliceLR2(id, speed, amount, size, onExitOptionalFunction, stop1, stop2){
if(id){
id=(typeof(id)=="object")? id.id: id;
var variableName=id+"_clipper";
	if(window[variableName] && window[variableName].isRunning){return;};
	if(!id || !document.getElementById(id)){return;};
var object=window[variableName]=new Object();
object['layer']=document.getElementById(id);
object["id"]=id;
var name="psliceLR2";//
object[name]=window[name];
object["last"]=name;
object.isRunning=1;
object['speed']=parseFloat(speed) || 100;
object['amount']=parseFloat(amount) || 1;
object['half']=object['amount'];///2;
object['size']=Math.abs( parseFloat(size) ) || object['layer'].offsetWidth/2;//
onExitOptionalFunction=(typeof(onExitOptionalFunction)=="string")?
window[onExitOptionalFunction]:onExitOptionalFunction;
object['onExitOptionalFunction']=(typeof(onExitOptionalFunction)=="function")?
	onExitOptionalFunction:(onExitOptionalFunction/*==1*/)?
	function(object){
	document.getElementById( object.id ).style.visibility="hidden";
	object.setClip(object.originalClip);
	document.getElementById( object.id ).style.left=object.originalLeft;
	document.getElementById( object.id ).style.top=object.originalTop;
	object.midwayOver=0;
	}
	:0;
object['stop1']=parseFloat(stop1) || object['layer'].offsetWidth;
object['stop2']=parseFloat(stop2) || object['layer'].offsetHeight;
object['timer']=null;
object["stop"]=function(){
	clearInterval(this.timer);
	this.isRunning=0;
	if(typeof(this.onExitOptionalFunction)=="function"){this.onExitOptionalFunction(this);};
}
object["setClip"]=
	function(array){
		if(typeof(array)=="string"){array=array.match(/\d+/g);}
	var output="rect(";
	for(var a=0; a<array.length; a++){output+=array[a]+"px, ";}
	this.layer.style.clip=output.substring(0, output.length - 2)+")";
	};
object["getClip"]=
	function(){
		if(!this.layer.style.clip){
			this.layer.style.clip=
			"rect(0px, "+ parseFloat(this.layer.offsetWidth)+"px, "+
			parseFloat(this.layer.offsetHeight) + "px, 0px)";
		};
	var clip=this.layer.style.clip.replace(/(^\s*rect\s*\()|(\)\s*$)/g,'').replace(/\s+/g," ").split(" ");
	return [parseFloat(clip[0]), parseFloat(clip[1]), parseFloat(clip[2]), parseFloat(clip[3])];
	};
object['layer'].style.position="absolute";
object['layer'].style.visibility="visible";
object["originalTop"]=object['layer'].offsetTop;
object["originalLeft"]=object['layer'].offsetLeft;
object['originalClip']=object.getClip();
object['top']=object['originalClip'][0];
object['right']=0;//object['originalClip'][1];
object['bottom']=object['originalClip'][2];
object['left']=object['originalClip'][3];
object.setClip([ object['top'], object['right'], object['bottom'], object['left'] ]);
object['timer']=setInterval(
	variableName+"."+name+"()", object['speed']
);
return 0;
};
//RUNTIME:
if(this.right<this.size){/*begins*/
this.right+=(this.right+this.amount>this.size)?
(this.size-this.right):this.amount;
}
else if(this.right+this.half>this.stop1){/*ends*/
this.right=this.stop1;
var amount=(this.left+this.amount>this.stop1)?
(this.stop1-this.left):this.amount;
this.left=Math.round(this.left + amount);	
this.layer.style.left=Math.round(
	Math.abs(this.originalLeft - (this.right-this.left)) - this.layer.offsetWidth
	);
}
else {/*core*/
this.left+=this.half;
this.right+=this.half;
this.layer.style.left=Math.round(this.originalLeft - this.left);
};
	this.setClip( [this.top, this.right, this.bottom, this.left] );
//EXIT CONDITION:
if(this.left>=this.stop1){ this.stop(); };
/*keep this comment to reuse freely
http://www.fullposter.com/?1 */}




function psliceRL(id, speed, amount, size, onExitOptionalFunction, stop1, stop1){
if(id){
id=(typeof(id)=="object")? id.id: id;
var variableName=id+"_clipper";
	if(window[variableName] && window[variableName].isRunning){return;};
	if(!id || !document.getElementById(id)){return;};
var object=window[variableName]=new Object();
object['layer']=document.getElementById(id);
object["id"]=id;
var name="psliceRL";//
object[name]=window[name];
object["last"]=name;
object.isRunning=1;
object['speed']=parseFloat(speed) || 100;
object['amount']=parseFloat(amount) || 1;
object['half']=object['amount'];///2;
object['size']=Math.abs( parseFloat(size) ) || object['layer'].offsetWidth/2;
onExitOptionalFunction=(typeof(onExitOptionalFunction)=="string")?
window[onExitOptionalFunction]:onExitOptionalFunction;
object['onExitOptionalFunction']=(typeof(onExitOptionalFunction)=="function")?
	onExitOptionalFunction:(onExitOptionalFunction/*==1*/)?
	function(object){
	document.getElementById( object.id ).style.visibility="hidden";
	object.setClip(object.originalClip);
	document.getElementById( object.id ).style.left=object.originalLeft;
	document.getElementById( object.id ).style.top=object.originalTop;
	object.midwayOver=0;
	}
	:0;
object['stop1']=parseFloat(stop1) || 0;//object['layer'].offsetWidth;
object['stop2']=parseFloat(stop1) || 0;
object['timer']=null;
object["stop"]=function(){
	clearInterval(this.timer);
	this.isRunning=0;
	if(typeof(this.onExitOptionalFunction)=="function"){this.onExitOptionalFunction(this);};
}
object["setClip"]=
	function(array){
		if(typeof(array)=="string"){array=array.match(/\d+/g);}
	var output="rect(";
	for(var a=0; a<array.length; a++){output+=array[a]+"px, ";}
	this.layer.style.clip=output.substring(0, output.length - 2)+")";
	};
object["getClip"]=
	function(){
		if(!this.layer.style.clip){
			this.layer.style.clip=
			"rect(0px, "+ parseFloat(this.layer.offsetWidth)+"px, "+
			parseFloat(this.layer.offsetHeight) + "px, 0px)";
		};
	var clip=this.layer.style.clip.replace(/(^\s*rect\s*\()|(\)\s*$)/g,'').replace(/\s+/g," ").split(" ");
	return [parseFloat(clip[0]), parseFloat(clip[1]), parseFloat(clip[2]), parseFloat(clip[3])];
	};
object['layer'].style.position="absolute";
object['layer'].style.visibility="visible";
object["originalTop"]=object['layer'].offsetTop;
object["originalLeft"]=object['layer'].offsetLeft;
object['originalClip']=object.getClip();
object['top']=object['originalClip'][0];
object['right']=object['originalClip'][1];
object['bottom']=object['originalClip'][2];
object['left']=object['layer'].offsetWidth;//object['originalClip'][3];
object.setClip([ object['top'], object['right'], object['bottom'], object['left'] ]);
object['timer']=setInterval(
	variableName+"."+name+"()", object['speed']
);
return 0;
};
//RUNTIME:
if(this.right-this.left<this.size && !this.midwayOver){/*begins*/
this.left-=(this.size-(this.right-this.left)<this.amount)?
(this.size-(this.right-this.left)):this.amount;
}
else if(this.left>this.stop1){/*core*/
var remains=(this.left-this.half<this.stop1)?
Math.abs(this.stop1-this.left):0;
this.left-=(this.left-this.half<this.stop1)?
this.left-this.stop1:this.half; 
this.right-=this.half+remains;
this.layer.style.left=Math.round((this.layer.offsetWidth-this.size) + this.originalLeft - (this.left || -this.amount));
this.midwayOver=1;
}
else if(this.left<=this.stop1){/*ends*/
var remains=(this.left>this.stop1)?
this.left:0;
this.left-=(this.left>this.stop1)?
this.left:0;
this.right-=(this.right-this.amount<=this.stop1)?
(this.right-this.stop1)+remains:this.amount+remains;
};
	this.setClip( [this.top, this.right, this.bottom, this.left] );
//EXIT CONDITION:
if(this.left + this.right - this.stop1 <= this.stop1){ this.stop(); };
/*keep this comment to reuse freely
http://www.fullposter.com/?1 */}




function psliceRL2(id, speed, amount, size, onExitOptionalFunction, stop1, stop1){
if(id){
id=(typeof(id)=="object")? id.id: id;
var variableName=id+"_clipper";
	if(window[variableName] && window[variableName].isRunning){return;};
	if(!id || !document.getElementById(id)){return;};
var object=window[variableName]=new Object();
object['layer']=document.getElementById(id);
object["id"]=id;
var name="psliceRL2";//
object[name]=window[name];
object["last"]=name;
object.isRunning=1;
object['speed']=parseFloat(speed) || 100;
object['amount']=parseFloat(amount) || 1;
object['half']=object['amount'];///2;
object['size']=Math.abs( parseFloat(size) ) || object['layer'].offsetWidth/2;
onExitOptionalFunction=(typeof(onExitOptionalFunction)=="string")?
window[onExitOptionalFunction]:onExitOptionalFunction;
object['onExitOptionalFunction']=(typeof(onExitOptionalFunction)=="function")?
	onExitOptionalFunction:(onExitOptionalFunction/*==1*/)?
	function(object){
	document.getElementById( object.id ).style.visibility="hidden";
	object.setClip(object.originalClip);
	document.getElementById( object.id ).style.left=object.originalLeft;
	document.getElementById( object.id ).style.top=object.originalTop;
	object.midwayOver=0;
	}
	:0;
object['stop1']=parseFloat(stop1) || 0;//object['layer'].offsetWidth;
object['stop2']=parseFloat(stop1) || 0;
object['timer']=null;
object["stop"]=function(){
	clearInterval(this.timer);
	this.isRunning=0;
	if(typeof(this.onExitOptionalFunction)=="function"){this.onExitOptionalFunction(this);};
}
object["setClip"]=
	function(array){
		if(typeof(array)=="string"){array=array.match(/\d+/g);}
	var output="rect(";
	for(var a=0; a<array.length; a++){output+=array[a]+"px, ";}
	this.layer.style.clip=output.substring(0, output.length - 2)+")";
	};
object["getClip"]=
	function(){
		if(!this.layer.style.clip){
			this.layer.style.clip=
			"rect(0px, "+ parseFloat(this.layer.offsetWidth)+"px, "+
			parseFloat(this.layer.offsetHeight) + "px, 0px)";
		};
	var clip=this.layer.style.clip.replace(/(^\s*rect\s*\()|(\)\s*$)/g,'').replace(/\s+/g," ").split(" ");
	return [parseFloat(clip[0]), parseFloat(clip[1]), parseFloat(clip[2]), parseFloat(clip[3])];
	};
object['layer'].style.position="absolute";
object['layer'].style.visibility="visible";
object["originalTop"]=object['layer'].offsetTop;
object["originalLeft"]=object['layer'].offsetLeft;
object['originalClip']=object.getClip();
object['top']=object['originalClip'][0];
object['right']=object['originalClip'][1];
object['bottom']=object['originalClip'][2];
object['left']=object['layer'].offsetWidth;//object['originalClip'][3];
object.setClip([ object['top'], object['right'], object['bottom'], object['left'] ]);
object['timer']=setInterval(
	variableName+"."+name+"()", object['speed']
);
return 0;
};
//RUNTIME:
if(this.right-this.left<this.size && !this.midwayOver){/*begins*/
this.left-=(this.size-(this.right-this.left)<this.amount)?
(this.size-(this.right-this.left)):this.amount;
}
else if(this.left>this.stop1){/*core*/
var remains=(this.left-this.half<this.stop1)?
Math.abs(this.stop1-this.left):0;
this.left-=(this.left-this.half<this.stop1)?
this.left-this.stop1:this.half; 
this.right-=this.half+remains;
this.layer.style.left=Math.round((this.layer.offsetWidth-this.size) + this.originalLeft - (this.left || -this.amount));
this.midwayOver=1;
}
else if(this.left<=this.stop1){/*ends*/
var remains=(this.left>this.stop1)?
this.left:0;
this.layer.style.left=Math.round( 
	(this.layer.offsetWidth-this.size) + this.originalLeft	+ (this.size - this.right) + this.amount
);
this.left-=(this.left>this.stop1)?
this.left:0;
var amount=(this.right-this.amount<=this.stop1)?
(this.right-this.stop1)+remains:this.amount+remains;
this.right=Math.round(this.right-amount);
};
	this.setClip( [this.top, this.right, this.bottom, this.left] );
//EXIT CONDITION:
if(this.left + this.right - this.stop1 <= this.stop1){ this.stop(); };
/*keep this comment to reuse freely
http://www.fullposter.com/?1 */}




function psliceTB(id, speed, amount, size, onExitOptionalFunction, stop1, stop2){
if(id){
id=(typeof(id)=="object")? id.id: id;
var variableName=id+"_clipper";
	if(window[variableName] && window[variableName].isRunning){return;};
	if(!id || !document.getElementById(id)){return;};
var object=window[variableName]=new Object();
object['layer']=document.getElementById(id);
object["id"]=id;
var name="psliceTB";//
object[name]=window[name];
object["last"]=name;
object.isRunning=1;
object['speed']=parseFloat(speed) || 100;
object['amount']=parseFloat(amount) || 1;
object['half']=object['amount'];///2;
object['size']=Math.abs( parseFloat(size) ) || object['layer'].offsetHeight/2;//
onExitOptionalFunction=(typeof(onExitOptionalFunction)=="string")?
window[onExitOptionalFunction]:onExitOptionalFunction;
object['onExitOptionalFunction']=(typeof(onExitOptionalFunction)=="function")?
	onExitOptionalFunction:(onExitOptionalFunction/*==1*/)?
	function(object){
	document.getElementById( object.id ).style.visibility="hidden";
	object.setClip(object.originalClip);
	document.getElementById( object.id ).style.left=object.originalLeft;
	document.getElementById( object.id ).style.top=object.originalTop;
	object.midwayOver=0;
	}
	:0;
object['stop1']=parseFloat(stop1) || object['layer'].offsetWidth;
object['stop2']=parseFloat(stop2) || object['layer'].offsetHeight;
object['timer']=null;
object["stop"]=function(){
	clearInterval(this.timer);
	this.isRunning=0;
	if(typeof(this.onExitOptionalFunction)=="function"){this.onExitOptionalFunction(this);};
}
object["setClip"]=
	function(array){
		if(typeof(array)=="string"){array=array.match(/\d+/g);}
	var output="rect(";
	for(var a=0; a<array.length; a++){output+=array[a]+"px, ";}
	this.layer.style.clip=output.substring(0, output.length - 2)+")";
	};
object["getClip"]=
	function(){
		if(!this.layer.style.clip){
			this.layer.style.clip=
			"rect(0px, "+ parseFloat(this.layer.offsetWidth)+"px, "+
			parseFloat(this.layer.offsetHeight) + "px, 0px)";
		};
	var clip=this.layer.style.clip.replace(/(^\s*rect\s*\()|(\)\s*$)/g,'').replace(/\s+/g," ").split(" ");
	return [parseFloat(clip[0]), parseFloat(clip[1]), parseFloat(clip[2]), parseFloat(clip[3])];
	};
object['layer'].style.position="absolute";
object['layer'].style.visibility="visible";
object["originalTop"]=object['layer'].offsetTop;
object["originalLeft"]=object['layer'].offsetLeft;
object['originalClip']=object.getClip();
object['top']=object['originalClip'][0];
object['right']=object['originalClip'][1];
object['bottom']=0;//object['originalClip'][2];
object['left']=object['originalClip'][3];
object.setClip([ object['top'], object['right'], object['bottom'], object['left'] ]);
object['timer']=setInterval(
	variableName+"."+name+"()", object['speed']
);
return 0;
};
//RUNTIME:
if(this.bottom<this.size){/*begins*/
this.bottom+=(this.bottom+this.amount>this.size)?
(this.size-this.bottom):this.amount;
}
else if(this.bottom+this.half>this.stop2){/*ends*/
this.bottom=this.stop2;
var amount=(this.top+this.amount>this.stop2)?
(this.stop2-this.top):this.amount;
this.top+=amount;
}
else {/*core*/
this.top+=this.half;
this.bottom+=this.half;
this.layer.style.top=Math.round(this.originalTop - this.top);
};
	this.setClip( [this.top, this.right, this.bottom, this.left] );
//EXIT CONDITION:
if(this.top>=this.stop2){ this.stop(); };
/*keep this comment to reuse freely
http://www.fullposter.com/?1 */}




function psliceTB2(id, speed, amount, size, onExitOptionalFunction, stop1, stop2){
if(id){
id=(typeof(id)=="object")? id.id: id;
var variableName=id+"_clipper";
	if(window[variableName] && window[variableName].isRunning){return;};
	if(!id || !document.getElementById(id)){return;};
var object=window[variableName]=new Object();
object['layer']=document.getElementById(id);
object["id"]=id;
var name="psliceTB2";//
object[name]=window[name];
object["last"]=name;
object.isRunning=1;
object['speed']=parseFloat(speed) || 100;
object['amount']=parseFloat(amount) || 1;
object['half']=object['amount'];///2;
object['size']=Math.abs( parseFloat(size) ) || object['layer'].offsetHeight/2;//
onExitOptionalFunction=(typeof(onExitOptionalFunction)=="string")?
window[onExitOptionalFunction]:onExitOptionalFunction;
object['onExitOptionalFunction']=(typeof(onExitOptionalFunction)=="function")?
	onExitOptionalFunction:(onExitOptionalFunction/*==1*/)?
	function(object){
	document.getElementById( object.id ).style.visibility="hidden";
	object.setClip(object.originalClip);
	document.getElementById( object.id ).style.left=object.originalLeft;
	document.getElementById( object.id ).style.top=object.originalTop;
	object.midwayOver=0;
	}
	:0;
object['stop1']=parseFloat(stop1) || object['layer'].offsetWidth;
object['stop2']=parseFloat(stop2) || object['layer'].offsetHeight;
object['timer']=null;
object["stop"]=function(){
	clearInterval(this.timer);
	this.isRunning=0;
	if(typeof(this.onExitOptionalFunction)=="function"){this.onExitOptionalFunction(this);};
}
object["setClip"]=
	function(array){
		if(typeof(array)=="string"){array=array.match(/\d+/g);}
	var output="rect(";
	for(var a=0; a<array.length; a++){output+=array[a]+"px, ";}
	this.layer.style.clip=output.substring(0, output.length - 2)+")";
	};
object["getClip"]=
	function(){
		if(!this.layer.style.clip){
			this.layer.style.clip=
			"rect(0px, "+ parseFloat(this.layer.offsetWidth)+"px, "+
			parseFloat(this.layer.offsetHeight) + "px, 0px)";
		};
	var clip=this.layer.style.clip.replace(/(^\s*rect\s*\()|(\)\s*$)/g,'').replace(/\s+/g," ").split(" ");
	return [parseFloat(clip[0]), parseFloat(clip[1]), parseFloat(clip[2]), parseFloat(clip[3])];
	};
object['layer'].style.position="absolute";
object['layer'].style.visibility="visible";
object["originalTop"]=object['layer'].offsetTop;
object["originalLeft"]=object['layer'].offsetLeft;
object['originalClip']=object.getClip();
object['top']=object['originalClip'][0];
object['right']=object['originalClip'][1];
object['bottom']=0;//object['originalClip'][2];
object['left']=object['originalClip'][3];
object.setClip([ object['top'], object['right'], object['bottom'], object['left'] ]);
object['timer']=setInterval(
	variableName+"."+name+"()", object['speed']
);
return 0;
};
//RUNTIME:
if(this.bottom<this.size){/*begins*/
this.bottom+=(this.bottom+this.amount>this.size)?
(this.size-this.bottom):this.amount;
}
else if(this.bottom+this.half>this.stop2){/*ends*/
this.bottom=this.stop2;
var amount=(this.top+this.amount>this.stop2)?
(this.stop2-this.top):this.amount;
this.top+=amount;
this.layer.style.top=Math.round(
	Math.abs(this.originalTop - (this.bottom-this.top)) - this.layer.offsetHeight
	);
}
else {/*core*/
this.top+=this.half;
this.bottom+=this.half;
this.layer.style.top=Math.round(this.originalTop - this.top);
};
	this.setClip( [this.top, this.right, this.bottom, this.left] );
//EXIT CONDITION:
if(this.top>=this.stop2){ this.stop(); };
/*keep this comment to reuse freely
http://www.fullposter.com/?1 */}




function psliceBT(id, speed, amount, size, onExitOptionalFunction, stop1, stop1){
if(id){
id=(typeof(id)=="object")? id.id: id;
var variableName=id+"_clipper";
	if(window[variableName] && window[variableName].isRunning){return;};
	if(!id || !document.getElementById(id)){return;};
var object=window[variableName]=new Object();
object['layer']=document.getElementById(id);
object["id"]=id;
var name="psliceBT";//
object[name]=window[name];
object["last"]=name;
object.isRunning=1;
object['speed']=parseFloat(speed) || 100;
object['amount']=parseFloat(amount) || 1;
object['half']=object['amount'];///2;
object['size']=Math.abs( parseFloat(size) ) || object['layer'].offsetHeight/2;
onExitOptionalFunction=(typeof(onExitOptionalFunction)=="string")?
window[onExitOptionalFunction]:onExitOptionalFunction;
object['onExitOptionalFunction']=(typeof(onExitOptionalFunction)=="function")?
	onExitOptionalFunction:(onExitOptionalFunction/*==1*/)?
	function(object){
	document.getElementById( object.id ).style.visibility="hidden";
	object.setClip(object.originalClip);
	document.getElementById( object.id ).style.left=object.originalLeft;
	document.getElementById( object.id ).style.top=object.originalTop;
	object.midwayOver=0;
	}
	:0;
object['stop1']=parseFloat(stop1) || 0;//object['layer'].offsetWidth;
object['stop2']=parseFloat(stop1) || 0;
object['timer']=null;
object["stop"]=function(){
	clearInterval(this.timer);
	this.isRunning=0;
	if(typeof(this.onExitOptionalFunction)=="function"){this.onExitOptionalFunction(this);};
}
object["setClip"]=
	function(array){
		if(typeof(array)=="string"){array=array.match(/\d+/g);}
	var output="rect(";
	for(var a=0; a<array.length; a++){output+=array[a]+"px, ";}
	this.layer.style.clip=output.substring(0, output.length - 2)+")";
	};
object["getClip"]=
	function(){
		if(!this.layer.style.clip){
			this.layer.style.clip=
			"rect(0px, "+ parseFloat(this.layer.offsetWidth)+"px, "+
			parseFloat(this.layer.offsetHeight) + "px, 0px)";
		};
	var clip=this.layer.style.clip.replace(/(^\s*rect\s*\()|(\)\s*$)/g,'').replace(/\s+/g," ").split(" ");
	return [parseFloat(clip[0]), parseFloat(clip[1]), parseFloat(clip[2]), parseFloat(clip[3])];
	};
object['layer'].style.position="absolute";
object['layer'].style.visibility="visible";
object["originalTop"]=object['layer'].offsetTop;
object["originalLeft"]=object['layer'].offsetLeft;
object['originalClip']=object.getClip();
object['top']=object['layer'].offsetHeight;//object['originalClip'][0];
object['right']=object['originalClip'][1];
object['bottom']=object['originalClip'][2];
object['left']=object['originalClip'][3];
object.setClip([ object['top'], object['right'], object['bottom'], object['left'] ]);
object['timer']=setInterval(
	variableName+"."+name+"()", object['speed']
);
return 0;
};
//RUNTIME:
if(this.bottom-this.top<this.size && !this.midwayOver){/*begins*/
this.top-=(this.size-(this.bottom-this.top)<this.amount)?
(this.size-(this.bottom-this.top)):this.amount;
}
else if(this.top>this.stop2){/*core*/
var remains=(this.top-this.half<this.stop2)?
Math.abs(this.stop2-this.top):0;
this.top-=(this.top-this.half<this.stop2)?
this.top-this.stop2:this.half; 
this.bottom-=this.half+remains;
this.layer.style.top=Math.round((this.layer.offsetHeight-this.size) + this.originalTop - (this.top || -this.amount));
this.midwayOver=1;
}
else if(this.top<=this.stop2){/*ends*/
var remains=(this.left>this.stop2)?
this.top:0;
this.top-=(this.top>this.stop2)?
this.top:0;
this.bottom-=(this.bottom-this.amount<=this.stop2)?
(this.bottom-this.stop2)+remains:this.amount+remains;
};
	this.setClip( [this.top, this.right, this.bottom, this.left] );
//EXIT CONDITION:
if(this.top + this.bottom - this.stop2 <= this.stop2){ this.stop(); };
/*keep this comment to reuse freely
http://www.fullposter.com/?1 */}




function psliceBT2(id, speed, amount, size, onExitOptionalFunction, stop1, stop1){
if(id){
id=(typeof(id)=="object")? id.id: id;
var variableName=id+"_clipper";
	if(window[variableName] && window[variableName].isRunning){return;};
	if(!id || !document.getElementById(id)){return;};
var object=window[variableName]=new Object();
object['layer']=document.getElementById(id);
object["id"]=id;
var name="psliceBT2";//
object[name]=window[name];
object["last"]=name;
object.isRunning=1;
object['speed']=parseFloat(speed) || 100;
object['amount']=parseFloat(amount) || 1;
object['half']=object['amount'];///2;
object['size']=Math.abs( parseFloat(size) ) || object['layer'].offsetHeight/2;
onExitOptionalFunction=(typeof(onExitOptionalFunction)=="string")?
window[onExitOptionalFunction]:onExitOptionalFunction;
object['onExitOptionalFunction']=(typeof(onExitOptionalFunction)=="function")?
	onExitOptionalFunction:(onExitOptionalFunction/*==1*/)?
	function(object){
	document.getElementById( object.id ).style.visibility="hidden";
	object.setClip(object.originalClip);
	document.getElementById( object.id ).style.left=object.originalLeft;
	document.getElementById( object.id ).style.top=object.originalTop;
	object.midwayOver=0;
	}
	:0;
object['stop1']=parseFloat(stop1) || 0;//object['layer'].offsetWidth;
object['stop2']=parseFloat(stop1) || 0;
object['timer']=null;
object["stop"]=function(){
	clearInterval(this.timer);
	this.isRunning=0;
	if(typeof(this.onExitOptionalFunction)=="function"){this.onExitOptionalFunction(this);};
}
object["setClip"]=
	function(array){
		if(typeof(array)=="string"){array=array.match(/\d+/g);}
	var output="rect(";
	for(var a=0; a<array.length; a++){output+=array[a]+"px, ";}
	this.layer.style.clip=output.substring(0, output.length - 2)+")";
	};
object["getClip"]=
	function(){
		if(!this.layer.style.clip){
			this.layer.style.clip=
			"rect(0px, "+ parseFloat(this.layer.offsetWidth)+"px, "+
			parseFloat(this.layer.offsetHeight) + "px, 0px)";
		};
	var clip=this.layer.style.clip.replace(/(^\s*rect\s*\()|(\)\s*$)/g,'').replace(/\s+/g," ").split(" ");
	return [parseFloat(clip[0]), parseFloat(clip[1]), parseFloat(clip[2]), parseFloat(clip[3])];
	};
object['layer'].style.position="absolute";
object['layer'].style.visibility="visible";
object["originalTop"]=object['layer'].offsetTop;
object["originalLeft"]=object['layer'].offsetLeft;
object['originalClip']=object.getClip();
object['top']=object['layer'].offsetHeight;//object['originalClip'][0];
object['right']=object['originalClip'][1];
object['bottom']=object['originalClip'][2];
object['left']=object['originalClip'][3];
object.setClip([ object['top'], object['right'], object['bottom'], object['left'] ]);
object['timer']=setInterval(
	variableName+"."+name+"()", object['speed']
);
return 0;
};
//RUNTIME:
if(this.bottom-this.top<this.size && !this.midwayOver){/*begins*/
this.top-=(this.size-(this.bottom-this.top)<this.amount)?
(this.size-(this.bottom-this.top)):this.amount;
}
else if(this.top>this.stop2){/*core*/
var remains=(this.top-this.half<this.stop2)?
Math.abs(this.stop2-this.top):0;
this.top-=(this.top-this.half<this.stop2)?
this.top-this.stop2:this.half; 
this.bottom-=this.half+remains;
this.layer.style.top=Math.round((this.layer.offsetHeight-this.size) + this.originalTop - (this.top || -this.amount));
this.midwayOver=1;
}
else if(this.top<=this.stop2){/*ends*/
var remains=(this.left>this.stop2)?
this.top:0;
this.layer.style.top=Math.round( 
	(this.layer.offsetHeight-this.size) + this.originalTop	+ (this.size - this.bottom) + this.amount
);
this.top-=(this.top>this.stop2)?
this.top:0;
var amount=(this.bottom-this.amount<=this.stop2)?
(this.bottom-this.stop2)+remains:this.amount+remains;
this.bottom=Math.round(this.bottom-amount);
};
	this.setClip( [this.top, this.right, this.bottom, this.left] );
//EXIT CONDITION:
if(this.top + this.bottom - this.stop2 <= this.stop2){ this.stop(); };
/*keep this comment to reuse freely
http://www.fullposter.com/?1 */}
Remove colors
Printable version To exclude hyperlinks from the print, check the checkbox »
Rss

Cast your vote for this topic

To perform this operation it is not necessary to be Full Poster members.
«Negative Positive»
Click here to save your vote (Current average: 0.00, Voters: 0)
Are you the author of this topic and do you want to append quickly more text? click here
Other topics
This subscriber has a blog too: Read the blog: 57 Shoutbox: 103 reviews: 153
Visitors: 4,285
Overall visits to all the topics: 4,970,420
Daily average (Calculated from the website subscription day): 2,062.41
Optional sorting commands:
Normal order: click here
Order by amount of visits: click here
Order by category: Programming Javascript
Current order: normal
Other categories available for this author (Limited data report: 100):
Advice: Martial Arts and Self Defense(4), Books(236), Critical Reviews and Essays(4), Dictionaries(1), Emergency Care(4), Epistles Letters and Advice(5), Fantasy Epics and Fables(1), History and Documents(5), Humor and Jokes(2), Methematics(2), Music and Lyrics(6), News Digests and Press Reviews(1), Novels Poetry and Stories(3), Philosophy Reviews(7), Poetry(1), Programming(4), Programming Ajax(2), Programming Javascript(82), Programming Php(52), Psychology(1), Quotes(1), Religion Esoterica and Spirituality(12), Scientifical Reviews(4), Self Improvement(1), Sport Activities and Apparels(2), Tarots(1)
Showing topics: 1, 10
Available total: 448
View only a list of the snippets by this author: click here.
Other topics available for this author: click on any title below to view the complete item:
Fighting Competently: Anticipation, And Remember It's In His Eyes Identification Number: 465 Visitors: 418 La Musa Segreta: Superiorità Onnipervasiva Della Boxe Identification Number: 464 Visitors: 1,208 Ha Senso Il Doping Sportivo? Effetto Matteo Nello Sport E Business Sportivo Identification Number: 463 Visitors: 1,445 The Musicians Within The Music Box And Other Hereafter Stories Identification Number: 462 Visitors: 2,705 Freud And Jung In A Nutshell: Three Or So Shots At Psychoanalysis For Dummies Identification Number: 461 Visitors: 4,168 Division The Math Of Gods: Ambiguities Of Antanairesis And New Math Operations Identification Number: 460 Visitors: 4,451 The Meaning Of Cruelty Identification Number: 459 Visitors: 4,841 Dÿanèra Ad Eleusi: La Folgorazione Ontologica: Il Pensare Sistematico E Non Identification Number: 458 Visitors: 5,620 Creative Writing: How To Write A Novel. Best Tips From The Bester Professionals Identification Number: 457 Visitors: 7,437 Newsreel Pseudo Intel: The Middle East Approaching The New 20s Identification Number: 456 Visitors: 7,415
External services
This page of this subscriber uses external services: Hide