// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults

function tabToggle(selectedTab) {
	var tabs = new Array('overview','advantages', 'industries', 'standard');
	       
	for (var i = 0; i < tabs.length; i++) {
		var tabObject = getByID(tabs[i] + '-tab');
		var contentObject = getByID(tabs[i] + '-content');
		       
		if (tabObject && contentObject) {
			if (tabs[i] == selectedTab) {
				tabObject.className = 'current';
				contentObject.style.display = 'block';
			} else {  
				tabObject.className = 'default';
				contentObject.style.display = 'none';
			}       
		}       
	}       
}       
      
function getByID (n) {
    var d = window.document;
    if (d.getElementById)
        return d.getElementById(n);
    else if (d.all)
        return d.all[n];
}       


function printpage() {
window.print();  
}

function NewWindow(url,winName) { 
  newwindow = window.open(url,winName,"scrollbars=yes,top=100,right=200, width=400, height=620");
 if (window.focus) {newwindow.focus()}
}

function printorder(order_id) {
	window.open('/admin/print_order?id='+ escape(order_id), 'order');
}

