var viewportheight;

/* WINDOW VIEWPORT SETUP */

function set_viewportheight(){ // set the windows viewport on pageload
	var viewportwidth;

	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight

	if (typeof window.innerWidth != 'undefined'){
		viewportwidth = window.innerWidth,
		viewportheight = window.innerHeight
	}

	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)

	else if (typeof document.documentElement != 'undefined' && typeof document.documentElement.clientWidth != 'undefined' && document.documentElement.clientWidth != 0){
		viewportwidth = document.documentElement.clientWidth,
		viewportheight = document.documentElement.clientHeight
	}

	// older versions of IE

	else
	{
		viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
		viewportheight = document.getElementsByTagName('body')[0].clientHeight
	}
	jQuery('#etarget_right').show();
	/* var one_add_width = 1147;
	var two_add_width = 1312;
	
	if (viewportwidth >= one_add_width){
	
		
		if (viewportwidth < two_add_width)
			jQuery('#all').width(one_add_width);
	}
	
	if (viewportwidth >= two_add_width){
		jQuery('#etarget_left').show();
		jQuery('#all').width(two_add_width);
		jQuery('#footer').css('margin-left','165px');
	} */

}

function addslashes(str) {
	str=str.replace(/\\/g,'\\\\');
	return str;
}

function stripslashes(str) {
	str=str.replace(/\\'/g,'\'');
	str=str.replace(/\\"/g,'"');
	str=str.replace(/\\0/g,'\0');
	str=str.replace(/\\\\/g,'\\');
	return str;
}

function check_propune(){
	var mscode = document.getElementById('mscode').value;
	var scode = document.getElementById('scode').value;
	if (hex_md5(mscode) != scode){
		alert ('Cod de verificare incorecta');
		return false;
	}
	return true;
}

$(document).ready(function() {
	set_viewportheight();
});