﻿// JavaScript Document

var IE = /*@cc_on!@*/false;
var Opera = !!window.opera;


function openWindow(url,target, width, height){
	var win = window.open(url, target || 'new1', "width=" + (width || 600) + ",height=" + (height || 600) + ",status=yes, scrollbars=yes, resizable=yes")
  win.focus();
}

var open_window = openWindow;
function opwin(target, width, height){
	//alert(this)
	if(this.href){
		openWindow(this.href, target, width, height);
		return false;
	}
}

if(!$){
	var $ = function(id){
		return typeof id === 'string' ? document.getElementById(id) : id;
	}
}

function getStyle(element){
	return element.currentStyle || document.defaultView.getComputedStyle(element, '');
}

function toggle(element){
	element = $(element);
	element.style.display = getStyle(element).display == 'none' ? 'block' : 'none';
}

function hide(element){
	$(element).style.display = 'none';
}

function show(element){
	$(element).style.display = 'block';
}

function elementText(element){
	element = $(element);
	return IE ? element.innerText : element.textContent;
}

Object.extend = function(destination, source){
	for(var property in source)
		destination[property] = source[property];
}

Object.extend(String.prototype, {
	trim : function(){
		return this.replace(/^\s+|\s+$/g, '');
	}
});



