// Open APPFORM
function appwindow(){
window.open("http://www.rinoplasti.com/appform.html","Requests","top=50,left=50', menubar=0,resizable=0,scrollbars=1,width=600,height=600");
}

// Open Contact Form
function contactwindow(){
window.open("http://www.rinoplasti.com/contact/contact_form.php","Requests2","top=50,left=50', menubar=0,resizable=0,scrollbars=1,width=600,height=500");
}

// Open Picture Form
function picture_window(){
window.open("http://www.rinoplasti.com/contact/picture_form.php","Requests3","top=50,left=50', menubar=0,resizable=0,scrollbars=1,width=600,height=500");
}

// Open Picture Form
function outct_window(){
window.open("http://www.rinoplasti.com/outform.html","Requests3","top=50,left=50', menubar=0,resizable=0,scrollbars=1,width=600,height=500");
}

// Open Picture Form
function msn_window(){
window.open("http://www.rinoplasti.com/msnwin.html","Requests4","top=50,left=50', menubar=0,resizable=0,scrollbars=1,width=540,height=440");
}

// Splash Video Player
function splash_video(x, y, z){

document.getElementById('left_half').className = 'videobox';
document.getElementById('left_half').innerHTML = '<div class="details"><b>' + y + '</b></div>';
document.getElementById('left_half').innerHTML += '<div id="jwplay"></div>';
document.getElementById('left_half').innerHTML += '<div class="details">' + z + '</div>';
	
var flashvars = { file:'http://www.emreilhan.com/static/videos/' + x + '.flv' ,autostart:'true' };
var params = { allowfullscreen:'true', allowscriptaccess:'always' };
var attributes = { id:'jwplay', name:'jwplay' };

swfobject.embedSWF('http://www.emreilhan.com/static/videos/player.swf','jwplay','463','393','9.0.115','false', flashvars, params, attributes);


}


var noto;

function bounce_image(node_id){
	
	var mtop;
	var i = -1;
	var setto;
	
	if(node_id != 'ei_ns_1'){
		debounce_image('ei_ns_1');
	}
	
	if(node_id != 'ei_ns_2'){
		debounce_image('ei_ns_2');
	}
	
	if(node_id != 'ei_ns_3'){
		debounce_image('ei_ns_3');
	}
	
	if(node_id != 'ei_ns_4'){
		debounce_image('ei_ns_4');
	}
	
	if(mtop = document.getElementById(node_id).style.marginTop){
		setto = mtop.replace('px', '');
		setto = parseInt(setto);
		setto--;
		mtop = setto + 'px';
	}else{
	
		mtop = i + 'px';
	}
	
	if(mtop != '-10px'){
		document.getElementById(node_id).style.marginTop=mtop;
		clearTimeout(noto);
		noto = setTimeout("bounce_image('" + node_id + "')", 20);
	}
	
}

function debounce_image(node_id){

	document.getElementById(node_id).style.marginTop='0px';

}
