var feedback_id='';var useragent = 'CCBot/1.0 (+http://www.commoncrawl.org/bot.html)';var is_global_from_url_fb=true;var global_from_url_fb='';
document.write('<style type="text/css">.modalDialog_transparentDivs_feedbk{filter:alpha(opacity=60);opacity:0.6;background-color:#333; z-index:1; position:absolute;} #DHTMLSuite_modalBox_contentDiv_feedbk{ border:0px solid #000;padding:0px;z-index:100;background-image:url('+gl_path+'pubsrc/flashbg.png); background-repeat:no-repeat; position:fixed !important; position:absolute;} .modalDialog_contentDiv_shadow_feedbk{z-index:90;position:absolute;background-color:#000;filter:alpha(opacity=80);opacity:0.8;}</style>');

/**********************************************************************/
var gl_position_fb='left';
var gl_color_feed='DAEBF5';
var data=gl_attributes.split("^^");
var gl_xml_file_fb=data[0]+'.xml';
gl_position_fb=data[1];
gl_color_feed=data[2];
gl_but_color_feed=data[3];
var feedbackcode_survey=data[0];

if (typeof window.attachEvent=='object'){
document.write('<!--[if lte IE 6]>\n'+
'<script type="text/javascript">\n'+
'var ie6_or_less=1;\n'+
'<\/script>\n'+
'<![endif]-->\n'+
'<!--[if lt IE 5.5]>\n'+
'<script type="text/javascript">\n'+
'var less_than_ie5_5=1;\n'+
'<\/script>\n'+
'<![endif]-->')
}

var menu=[], resizereinit=true;
function truebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function getedge(o, is_top){
	var edge;
	if (is_top)
		edge=window.pageYOffset? window.pageYOffset : truebody().scrollTop? truebody().scrollTop : 0;
	else{
		edge=o.menupos=='left'? 0 : truebody().clientWidth? truebody().clientWidth : window.innerWidth&&truebody().offsetHeight<=window.innerHeight? window.innerWidth :  window.innerWidth? window.innerWidth-20 : 0;
		edge+=window.pageXOffset? window.pageXOffset : truebody().scrollLeft? truebody().scrollLeft: 0;
	}
	return edge;
}
function keep_in_view(o){
if(o.keepinview){
if(o.m.ft){
o.m.ft=0;
o.m.topP=o.m.offsetTop;
o.m.ltop=0;
}
var pt=getedge(o, 'top'), ks=typeof o.keepinview=='number'&&o.keepinview<o.m.topP&&o.keepinview>0? o.keepinview : o.m.topP, smooth=0;
if (pt!=o.m.ltop){
if(o.menupos=='top')
o.m.style.visibility='hidden';
smooth = pt>o.m.topP-ks? .2 * (pt - o.m.ltop - o.m.topP + ks) : o.m.ltop>0? -.2 * o.m.ltop : 0;
smooth = smooth > 0 ? Math.ceil(smooth) : Math.floor(smooth);
}
else if(o.menupos=='top')
o.m.style.visibility='';
o.m.style.top=(o.m.style.top? parseInt(o.m.style.top) : o.m.topP)+smooth+'px';
o.m.ltop += smooth;
}
if(o.menupos=='top'){
if(typeof o.menuleft=='string'){
o.m.style.left=o.menuleft
o.m.style.marginLeft=Math.floor(o.m.getElementsByTagName('div')[0].offsetWidth/-2)+'px';
o.lleft=o.m.offsetLeft;
}
o.m.style.marginLeft=0;
o.m.style.left=o.lleft+(window.pageXOffset? window.pageXOffset : truebody().scrollLeft? truebody().scrollLeft: 0)+'px';
}
else
o.m.style.left=getedge(o)-(o.menupos=='right'? o.m.offsetWidth : 0)+'px';
}
function move(el, num){
el.getElementsByTagName('div')[0].style[el.menupos]=parseInt(el.getElementsByTagName('div')[0].style[el.menupos])+num+'px';
if(el.menupos=='right'){
if(el.kviewtype=='absolute')
el.style.left=parseInt(el.style.left)-num+'px';
el.style.width=parseInt(el.style.width)+num+'px';
}
if(num>0)
el.moving=setTimeout(function(){movein(el)}, el.menuspeed)
else
el.moving=setTimeout(function(){moveout1(el)}, el.menuspeed)
}
function movein(el){
var m1=parseInt(el.getElementsByTagName('div')[0].style[el.menupos]);
if(el.moving)
clearTimeout(el.moving);
if (m1<-1*el.borderwidth)
move(el, Math.min(-1*m1-el.borderwidth, 10));
}
function moveout(el){
if(el.moving)
clearTimeout(el.moving);
el.moving=setTimeout(function(){moveout1(el)}, el.menupause);
}
function moveout1(el){
var aw=el.menupos=='top'? el.b.offsetHeight : el.b.offsetWidth, m1=el.getElementsByTagName('div')[0];
if(el.moving)
clearTimeout(el.moving);
if (parseInt(m1.style[el.menupos])>aw-(el.menupos=='top'? m1.offsetHeight : m1.offsetWidth)+10)
move(el, -10);
else {
m1.style[el.menupos]=aw-(el.menupos=='top'? m1.offsetHeight : m1.offsetWidth)+'px';
if(el.menupos=='right'){
el.style.width=aw+'px';
if(el.kviewtype=='absolute'){
var ed=truebody().clientWidth? truebody().clientWidth : window.innerWidth&&truebody().offsetHeight<=window.innerHeight? window.innerWidth :  window.innerWidth? window.innerWidth-20 : 0;
ed+=window.pageXOffset? window.pageXOffset : truebody().scrollLeft? truebody().scrollLeft: 0;
el.style.left=ed-el.offsetWidth+'px';
}
}
}

}
function to_em(n, o){
return Math.round((n/(16*parseInt(o.fontsize)/100))*1000)/1000;
}
function getrows(o){
var r=o.menuItems.length+(o.wrapbar? 1 : 0);
for (var i_tem = 0; i_tem < o.menuItems.length; i_tem++)
if (o.menuItems[i_tem][4]&&o.menuItems[i_tem][4]=='no')
r--;
return r;
}
function make_bar(o){
var browserName=navigator.appName; 
var version=navigator.appVersion;
if (useragent.indexOf("Windows NT 6.0")!=-1 && browserName=="Microsoft Internet Explorer"){
var bt=o.menupos=='right'||o.menupos=='top'? '<tr>' : '';
bt+='<td id="'+o.id+'bar" style="padding:0px;" '+(o.menupos=='top'? 'colspan="'+o.d_colspan : 'rowspan="'+getrows(o))+'">'
bt+=o.bartext+'</td>'
return bt+(o.menupos=='right'? '\n' : '</tr>\n');
}
else{
var bt=o.menupos=='right'||o.menupos=='top'? '<tr>' : '';
bt+='<td id="'+o.id+'bar"  '+(o.menupos=='top'? 'colspan="'+o.d_colspan : 'rowspan="'+getrows(o))+'">'
bt+=o.bartext+'</td>'
return bt+(o.menupos=='right'? '\n' : '</tr>\n');
}
}

function make_style(o){
if(o.user_defined_stylesheet&&!o.design_mode)
return '';
var sheet=''
sheet+='#'+o.id+' {\n'+
(o.menupos=='top'? 'top:0;\n' : 'top:'+o.menutop+'px; /*set initial Height from top*/\n')+
(o.menupos=='top'? 'left:'+o.menuleft+(typeof o.menuleft=='number'? 'px' : '')+';\n' : '')+
(o.menupos=='right'&&o.kviewtype=='fixed'? 'right:0;\n' : '')+
'position:'+o.kviewtype+';\n'+
'overflow:'+(o.menupos=='right'? 'visible' : 'visible')+';\n'+
'z-index:100;\n'+
(o.menupos=='left'? 'left:0;\n' : '')+
'}\n'+
'#'+o.id+' div {\n'+
'border-width:'+(typeof o.outbrdwidth=='number'? o.outbrdwidth+'px' : o.outbrdwidth)+'; /*Menu\'s outer border*/\n'+
'border-style:'+o.outbrdstyle+';\n'+
(o.outbrdcolor=='none'? '' : 'border-color:'+o.outbrdcolor+';\n')+
'position:absolute;\n'+
'color:black;\n'+
'background-color:transparent;\n'+
'}\n'+
'#'+o.id+' table {\n'+
'border:0px '+o.borderstyle+' '+o.bordercolor+'; /*Menu\'s inner border*/\n'+
(o.menupos=='top'? 'border-left-width:0;\n' : '')+
(o.menupos=='top'? 'border-bottom-width:0;\n' : '')+
'font-family:'+o.menufont+', sans-serif; /*Overall font for Menu*/\n'+
'font-size:'+o.fontsize+';\n'+
'border-collapse:collapse;\n'+
//'background-color:#'+gl_color_feed+';\n'+
'width:'+to_em(o.barwidth+o.hdingwidth+o.borderwidth*(o.d_colspan+2), o)+'em;\n'+
'}\n'+
'#'+o.id+' td { /*Characteristics for cells in the menu table - do not specify width here*/\n'+
'border-bottom:'+o.borderwidth+'px '+o.borderstyle+' '+o.bordercolor+';\n'+
'border-left:'+o.borderwidth+'px '+o.borderstyle+' '+o.bordercolor+';\n'+
'height:'+to_em(o.linkheight, o)+'em;\n'+
'padding:0;\n'+
'margin:0;\n'+
'text-align:'+o.linktxtalign+';\n'+
'}\n'+
'#'+o.id+' #'+o.id+'bar { /*Characteristics for initially visible \'draw\' bar (the vertical cell)*/\n'+
(o.menupos=='top'? 'height:' : 'width:')+to_em(o.barwidth+(document.all||o.menupos=='top'? o.borderwidth*2 : 0), o)+'em;\n'+
//'background-color:'+o.barbgcolor+';\n'+
'color:'+o.barcolor+';\n'+
'font-weight:'+o.barfontweight+';\n'+
'text-align:'+o.baralign+';\n'+
(o.menupos=='top'? '' : 'border-width:0;\n')+
'cursor:default;\n'+
'}\n'+
'#'+o.id+' .heading { /*Characteristics for heading cells in the menu table*/\n'+
'height:'+to_em(o.hdingheight, o)+'em;\n'+
'color:'+o.hdingcolor+';\n'+
'font-weight:'+o.hdingfontweight+';\n'+
//'text-indent:'+o.hdingindent+'ex;\n'+
//'background-color:'+o.hdingbgcolor+'; /*Background Color for menu headings */\n'+
'width:'+to_em(o.hdingwidth, o)+'em; /*This will be the menu body width.  This'+(o.menupos!='top'? ' (plus #'+o.id+'bar width for left and right menus)' : '')+' and 4 times the border width should also be the menu table\'s approximate width*/\n'+
'vertical-align:'+o.hdingvalign+';\n'+
'text-align:'+o.hdingtxtalign+';\n'+
'border-left-color:'+o.hdingbgcolor+';\n'+
'border-left-style:solid;\n'+
'}\n'+
(o.wrapbar&&o.menupos!='top'? '#'+o.id+' #'+o.id+'lastrow {\n'+
'height:'+to_em(o.barwidth, o)+'em;\n'+
//'background-color:'+o.barbgcolor+';\n'+
'border-width:0;\n'+
'margin:0 0 '+o.borderwidth+'px '+o.borderwidth+'px;\n'+
'}\n' : o.menupos!='top'? '#'+o.id+' #'+o.id+'lastrow {\n'+
'border-bottom-width:0;\n'+
'margin:0 0 '+o.borderwidth+'px '+o.borderwidth+'px;\n'+
'}\n' : '')+
'#'+o.id+' a {\n'+
'width:100%;\n'+
'height:100%;\n'+
'display:block;\n'+
'padding-top:'+to_em(o.linktopad, o)+'em;\n'+
'}\n';
if(o.design_mode){
if(document.getElementById('ooostyle'))
alert('Only one menu\'s script generated styles may be displayed at a time!\n\nCurrently showing '+document.getElementById('ooostyle').tell+'\'s stylesheet\n\n(or there is a syntax error - most\n\u00a0\u00a0\u00a0\u00a0likely in the menuItem.js file)');
else{
var isusing=o.user_defined_stylesheet? ' not' : '';
var sw=(window.innerWidth? window.innerWidth : truebody().clientWidth)/1.5; 
document.write('<textarea id="ooostyle" cols="'+Math.floor(sw/8)+'" rows="65" wrap="off" style="margin-left:-'+Math.floor(sw/2)+'px;overflow:auto;position:absolute;top:10px;left:50%;z-index:1000;">\n')
document.write('\/* '+o.id+'\'s Script Generated Styles: */\n\/* '+o.id+' is'+isusing+' currently using these via the script */\n\n'+sheet);
document.write('\n\/* End '+o.id+'\'s Script Generated Styles */');
document.write('</textarea>')
document.getElementById('ooostyle').tell=o.id;
}
}
if(!o.user_defined_stylesheet)
return '<style type="text/css">\n'+sheet+'</style>';
return '';
}
function make_style_make_menu(o, s){
if(s){
if(!o.id) {alert('a unique id is required for each menu');return;};
if(!o.menuItems||o.menuItems.constructor!=Array) {alert('an array of menu items is required for each menu');return;};
if(!o.menutop) {o.menutop=5};
if(!o.menuleft) {o.menuleft='50%'};
if(!o.keepinview&&typeof o.keepinview=='boolean')
o.keepinview=false;
else if(!o.keepinview) {o.keepinview=30};
if(!o.menuspeed) {o.menuspeed=20};
if(!o.menupause) {o.menupause=500};
if(!o.d_colspan) {o.d_colspan=2};
if(!o.allowtransparent) {o.allowtransparent=false};
if(!o.barwidth) {o.barwidth=22};
if(!o.hdingwidth) {o.hdingwidth=149};
if(!o.hdingheight) {o.hdingheight=22};
if(!o.hdingindent) {o.hdingindent=1};
if(!o.linkheight) {o.linkheight=16};
if(!o.outbrdwidth) {o.outbrdwidth=0};
if(!o.outbrdcolor) {o.outbrdcolor="none"};
if(!o.outbrdstyle) {o.outbrdstyle="none"};
if(!o.borderwidth) {o.borderwidth=1};
if(!o.bordercolor) {o.bordercolor="black"};
if(!o.borderstyle) {o.borderstyle="solid"};
if(!o.barcolor) {o.barcolor="white"};
if(!o.barbgcolor) {o.barbgcolor="#444444"};
if(!o.barfontweight) {o.barfontweight="bold"};
if(!o.baralign) {o.baralign="center"};
if(!o.menufont) {o.menufont="verdana"};
if(!o.fontsize) {o.fontsize="80%"};
if(!o.hdingcolor) {o.hdingcolor="white"};
if(!o.hdingbgcolor) {o.hdingbgcolor="#170088"};
if(!o.hdingfontweight) {o.hdingfontweight="bold"};
if(!o.hdingvalign) {o.hdingvalign="middle"};
if(!o.hdingtxtalign) {o.hdingtxtalign="left"};
if(!o.linktopad) {o.linktopad=0};
if(!o.linktxtalign) {o.linktxtalign="left"};
if(!o.linktarget) {o.linktarget=""};
if(!o.menupos) {o.menupos="left"};
if(!o.bartext) {o.bartext="SIDE MENU"};
if(!o.user_defined_stylesheet) {o.user_defined_stylesheet=false};
if(!o.user_defined_markup) {o.user_defined_markup=false};
if(!o.design_mode) {o.design_mode=false};
if(!o.wrapbar) {o.wrapbar=false};
if(!o.kviewtype) {o.kviewtype='absolute'};
if(typeof ie6_or_less!='undefined')
o.kviewtype='absolute';
else if(o.menupos=='top'&&o.kviewtype=='absolute')
o.kviewtype='fixed';
while(!o.menuItems[o.menuItems.length-1])
o.menuItems.length=o.menuItems.length-1;
document.write(make_style(o));
return;
}
else {
if(o.design_mode||!o.user_defined_markup){
var hw=o.hdingwidth;

var tb='<div id="'+o.id+'" onmouseover="movein_img(this);" onmouseout="moveout_img(this);" onclick="handle_click_feedbk();" style="cursor:pointer; padding-top:150px;"><div style="cursor:pointer;"><table>\n';
tb+=o.menupos=='right'? make_bar(o) : '';
for (var i_tem = 0; i_tem < o.menuItems.length; i_tem++){
if ((o.menupos=='top'&&i_tem==0)||i_tem>0&&(!o.menuItems[i_tem-1][4]||o.menuItems[i_tem-1][4]!=='no'))
tb+='<tr>'
if (o.menuItems[i_tem][1]&&o.menuItems[i_tem][1]!==''){
tb+='<td '+(i_tem==o.menuItems.length-1&&!o.wrapbar&&o.menupos!='top'? 'id="'+o.id+'lastrow" ' : '')+'colspan="'+(o.menuItems[i_tem][3]&&o.menuItems[i_tem][3]!==''? o.menuItems[i_tem][3] : o.d_colspan)+'"><a style="color:#'+gl_color_feed+'" href="'+o.menuItems[i_tem][1]+'" target="'+(o.menuItems[i_tem][2]? o.menuItems[i_tem][2] : o.linktarget)+'">'+o.menuItems[i_tem][0]+'</a></td>'
}
else
tb+='<td '+(i_tem==o.menuItems.length-1&&!o.wrapbar&&o.menupos!='top'? 'id="'+o.id+'lastrow" ' : '')+'class="heading" '+(o.menuItems[i_tem][3]&&o.menuItems[i_tem][3]!==''&&o.menuItems[i_tem][3]!==o.d_colspan? 'style="width:'+to_em(hw*o.menuItems[i_tem][3]/o.d_colspan, o)+'em;'+(i_tem>0&&o.menuItems[i_tem-1][4]&&o.menuItems[i_tem-1][4]=='no'? 'border-left-width:0;margin-left:'+o.borderwidth+'px;' : '')+'" ' : '')+'colspan="'+(o.menuItems[i_tem][3]&&o.menuItems[i_tem][3]!==''? o.menuItems[i_tem][3] : o.d_colspan)+'">'+o.menuItems[i_tem][0]+'</td>'
if (!o.menuItems[i_tem][4]||o.menuItems[i_tem][4]!=='no')
tb+=o.menupos=='left'&&i_tem==0? make_bar(o) : '</tr>\n';
}
tb+=o.wrapbar&&o.menupos!='top'? '<tr><td id="'+o.id+'lastrow" colspan="'+o.d_colspan+'">\u00a0</td></tr>\n' : '';
tb+=o.menupos=='top'? make_bar(o) : '';

if(!o.user_defined_markup)
document.writeln(tb+'</table></div></div>')

}
if(o.design_mode)
document.getElementById('ooostyle').value+='\n\n<!-- The Markup for '+o.id+' -->\n\n'+tb+'</table></div></div>\n\n<!-- End '+o.id+'\'s Markup -->'
o.m=document.getElementById(o.id);
var b=document.getElementById(o.id+'bar');
o.m.b=b;
o.m.ft=1;
o.m.menupos=o.menupos;
o.m.menupause=o.menupause;
o.m.menuspeed=o.menuspeed;
o.m.borderwidth=o.borderwidth;
o.m.kviewtype=o.kviewtype;
resizevent(o);
if(o.menupos=='top'&&typeof window.attachEvent=='object'&&typeof ie6_or_less!='undefined')
window.attachEvent('onscroll', function(){o.m.style.visibility='hidden';});
if(o.kviewtype=='absolute'&&(o.menupos!='top'||(typeof ie6_or_less!='undefined'&&typeof window.attachEvent=='object')))
setInterval(function(){keep_in_view(o)}, 20)
}
}

function resizevent(o){
var m1=o.m.getElementsByTagName('div')[0], bo=o.menupos=='top'? o.m.b.offsetHeight : o.m.b.offsetWidth;
m1.style[o.menupos]=bo-(o.menupos=='top'? m1.offsetHeight : m1.offsetWidth)+'px'
if(o.menupos=='right'){
if(o.kviewtype=='absolute')
o.m.style.left=getedge(o)-o.m.offsetWidth+'px';
//o.m.style.width=bo+'px';
o.m.style.height=m1.offsetHeight+'px';
if(typeof less_than_ie5_5!='undefined'){
o.m.onmouseover(o.m);
o.m.onmouseout(o.m);
}
}
if(o.menupos=='top'){
o.m.style.width=m1.style.width=o.m.getElementsByTagName('table')[0].offsetWidth+'px';
if(typeof o.menuleft=='string')
o.m.style.marginLeft=Math.floor(m1.offsetWidth/-2)+'px';
}
}
/*

ONTEXTRESIZE EVENT SPOOFER

Including this file in your page will allow you to assign a function
to window.ontextresize, which will be called when the user changes the
size of text on the page.

Used with (as far as I know) permission from: http://forkandspoonhelmet.com/Fork_and_Spoon_Helmet

*/
var ontextresizeLastSize = false;
if (window.attachEvent) window.attachEvent("onload", initOntextresizeListener);
else if (window.addEventListener) window.addEventListener("load", initOntextresizeListener, false);
function initOntextresizeListener() {
if(!resizereinit||typeof less_than_ie5_5!='undefined')
return;
	var testDiv = document.createElement("div");
	testDiv.style.position = "absolute";
	testDiv.style.height = "1em";
	testDiv.style.width = "1em";
	testDiv.style.top = "-2em";
	testDiv.style.left = "-2em";
	var docTestDiv = document.body.appendChild(testDiv);
	docTestDiv.id = "ontextresizeTestDiv";
	ontextresizeListener = setInterval("ontextresizeCheckTestDiv()",100);
}
function ontextresizeCheckTestDiv() {
	if (ontextresizeLastSize!=document.getElementById("ontextresizeTestDiv").offsetWidth) {
		if (ontextresizeLastSize && window.ontextresize) window.ontextresize.call();
		ontextresizeLastSize = document.getElementById("ontextresizeTestDiv").offsetWidth;
	}
}
window.ontextresize=function(){
for (var i_tem = 0; i_tem < menu.length; i_tem++)
if(typeof menu[i_tem]!='undefined')
resizevent(menu[i_tem]);
};

function make_menus(){
if(document.getElementById){
for (var i_tem = 0; i_tem < menu.length; i_tem++)
if(typeof menu[i_tem]!='undefined')
make_style_make_menu(menu[i_tem], 's');
for (i_tem = 0; i_tem < menu.length; i_tem++)
if(typeof menu[i_tem]!='undefined')
make_style_make_menu(menu[i_tem]);
}
}

//bartext:'<embed src="'+gl_path+'feedbackbutton.swf?xml='+gl_xml_file_fb+'&path='+gl_path+'" quality="high" bgcolor="#ffffff" width="53" height="116" name="feedback" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />',
//alert('<img id="feedbk_img_id" style="cursor:pointer;" src="'+gl_path+'images/feedback/'+gl_color_feed+'/'+gl_position_fb+'-1.gif"  width="41" height="108" alt="Feedback" />');
/******************************************************************************/
resizereinit=true;
menu[1] = {
id:'feebback_left_menu', //use unique quoted id (quoted) REQUIRED!!
bartext:'<img id="feedbk_img_id" style="cursor:pointer;border:0px; padding:0px; background:none;" src="'+gl_path+'images/feedback/'+gl_but_color_feed+'/'+gl_position_fb+'-2.png" width="38" height="168" alt="Feedback" />',
menupos:gl_position_fb,
kviewtype:'absolute', 
outbrdcolor:"none",
outbrdwidth:0,
outbrdstyle:"none",  
barwidth:38,
borderwidth:0,
barbgcolor:"#fff", 
hdingbgcolor:"#ff9900",
barbgcolor:"#858585",  
wrapbar:false,
d_colspan:2,
allowtransparent:false,
hdingwidth:1,
menuspeed:5,
menuItems:[['', "#", "_new"]  //no comma after last entry

]}; // REQUIRED!! do not edit or remove
make_menus();

/*************/
function movein_img() {
	var img_obj=document.getElementById('feedbk_img_id');
	img_obj.width="44";
	img_obj.src=gl_path+'images/feedback/'+gl_but_color_feed+'/'+gl_position_fb+'-3.png'; // gl_path+'images/feedht_over.gif';
}
function moveout_img() {
	var img_obj=document.getElementById('feedbk_img_id');
	//img_obj.src=gl_path+'images/feedht.gif';
		img_obj.width="38";
	img_obj.src=gl_path+'images/feedback/'+gl_but_color_feed+'/'+gl_position_fb+'-2.png'; 
}
/*************/

function handle_click_feedbk() {
if(is_global_from_url_fb)
	displayStaticMessage_feedbk('<div style="float:left; position:absolute;padding-left:375px;padding-top:15px;"><img src="'+gl_path+'images/close.png" border="0" onclick="messageObj_feedbk.close_feed();" width="47" height="47" style="border:0px; background:none;cursor:pointer;" /></div><div align="center" style="width:420px; height:404px; padding-top:15px; margin-left:14px; padding-right:14px;"><table align="center" border="0" cellpadding="0" cellspacing="0" width="420" height="398" marginheight="0" marginwidth="0" style="widows:transparent; margin:0px; background-color:#E4F4FD; padding-top:10px;"><tr><td align="left" style="height:50px;padding-left:20px;"><img src="'+gl_path+'images/instant_feedback.gif" onclick="test();" border="0" width="192" height="45" style="border:0px; background:none;" /></td></tr><tr><td align="left" style="height:30px;*height:25px;padding-left:20px;"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td style=" font-family: Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold; outline:0;">Praise<input type="radio" name="feed" id="feed" value="Praise" checked onclick="feed(1);" /></td><td style=" font-family: Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold;">Suggestion<input type="radio" name="feed" id="feed" value="Suggestion" onclick="feed(2);" /></td><td style="font-family: Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold;">Complaint<input type="radio" name="feed" value="Complaint" id="feed" onclick="feed(3);" /></td><td style="font-family: Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold;">Inquiry<input type="radio" name="feed" value="Inquiry" id="feed" onclick="feed(4);"/></td></tr></table></td></tr><tr><td align="left" style="height:35px;padding-left:20px;"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td style=" font-family: Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold;" >Title</td><td><input type="text" name="sufeed_title" id="sufeed_title" maxlength="30" style="width:340px; height:25px; border:1px solid #999999; padding-top:3px;"/></td></tr></table></td></tr><tr><td valign="top" align="left" style="height:80px; *height:70px; padding-top:5px;padding-left:20px;"><textarea style="width:378px; height:100px; *height:100px; border:1px solid #999999; padding-top:0px; overflow:hidden;" wrap="physical" name="sufeed_textarea" maxlength="250" id="sufeed_textarea" onkeyup="check_textlength(this.id);"></textarea></td></tr><tr><td align="left" valign="top" style="height:30px; *height:25px;padding-left:20px;"><div id="emailid1" style="display:block;height:25px;">&nbsp;</div><div id="emailid" style="display:none;font-family: Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold; height:25px; *padding-bottom:5px;">Email &nbsp;&nbsp;<input type="text" name="email" id="email" maxlength="50" style="width:330px;height:22px; border:1px solid #999999; padding-top:3px;" /></div></td></tr><tr><td align="left" valign="top" style="height:25px; *height:25px;padding-left:20px;"><div id="spamid1" style="display:block;height:25px;">&nbsp;</div><div id="spamid" style="display:none;font-family: Arial, Helvetica, sans-serif; font-size:14px;height:25px; padding-bottom:5px;">Spam Protector: &nbsp;&nbsp;5+5=<input type="text" name="spam" id="spam" style="width:120px;height:20px; border:1px solid #999999; padding-top:3px;" /></div></td></tr><tr><td style="height:40px;"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="center" style="font-family: Arial, Helvetica, sans-serif; font-size:14px; font-weight:bold;height:40px;">We truly value your opinion.<br />Thank you!</td><td><img src="'+gl_path+'images/submit_feedbck.gif" border="0" onclick="test()" width="171" height="41" style="border:0px; background:none; cursor:pointer;"/></td></tr></table></td></tr></table></div>',false);
else
	displayStaticMessage_feedbk('<div style="width:427px; height:400px; padding-top:3px;"><div onclick="messageObj_feedbk.close_feed();" style="float:left;cursor:pointer; position:absolute;padding-left:360px;padding-top:15px;" ><img src="'+gl_path+'images/close.png" border="0" width="47" height="47" style="border:0px; background:none;"   /></div><div style="margin:0px 0px 0px 0px; border:0px solid red;"><iframe src="'+gl_path+'integerate_feedback_error.php?file='+gl_xml_file_fb+'&path='+gl_path+'" name="advthtml" id="advthtml"  width="427" height="400" marginheight="0" marginwidth="0" style="widows:transparent; margin:0px; border:0px;" frameborder="0" scrolling="no"></iframe></div></div>',false);
}

function check_textlength(id) {
	var maxLen = 250; 
	if (document.getElementById(id).value.length >= maxLen) {
		document.getElementById(id).value = document.getElementById(id).value.substring(0, maxLen);
	}
}
DHTML_modalMessage_feedbk = function()
{
	var url;								// url of modal message
	var htmlOfModalMessage;					// html of modal message
	
	var divs_transparentDiv_feed;				// Transparent div covering page content
	var divs_content_feedbk;						// Modal message div.
	var iframe;								// Iframe used in ie
	var layoutCss;							// Name of css file;
	var width;								// Width of message box
	var height;								// Height of message box
	
	var existingBodyOverFlowStyle;			// Existing body overflow css
	var dynContentObj;						// Reference to dynamic content object
	var cssClassOfMessageBox;				// Alternative css class of message box - in case you want a different appearance on one of them
	var shadowDivVisible;					// Shadow div visible ? 
	var shadowOffset; 						// X and Y offset of shadow(pixels from content box)
	var MSIE;
		
	this.url = '';							// Default url is blank
	this.htmlOfModalMessage = '';			// Default message is blank
	this.layoutCss = 'modal-message.css';	// Default CSS file
	this.height = 200;						// Default height of modal message
	this.width = 400;						// Default width of modal message
	this.cssClassOfMessageBox = false;		// Default alternative css class for the message box
	this.shadowDivVisible = true;			// Shadow div is visible by default
	this.shadowOffset = 5;					// Default shadow offset.
	this.MSIE = false;
	if(navigator.userAgent.indexOf('MSIE')>=0) this.MSIE = true;
}

DHTML_modalMessage_feedbk.prototype = {
	// {{{ setSource(urlOfSource)
    /**
     *	Set source of the modal dialog box
     * 	
     *
     * @public	
     */		
	setSource : function(urlOfSource)
	{
		this.url = urlOfSource;
		
	}	
	// }}}	
	,
	// {{{ setHtmlContent(newHtmlContent)
    /**
     *	Setting static HTML content for the modal dialog box.
     * 	
     *	@param String newHtmlContent = Static HTML content of box
     *
     * @public	
     */		
	setHtmlContent : function(newHtmlContent)
	{
		this.htmlOfModalMessage = newHtmlContent;
		
	}
	// }}}		
	,
	// {{{ setSize(width,height)
    /**
     *	Set the size of the modal dialog box
     * 	
     *	@param int width = width of box
     *	@param int height = height of box
     *
     * @public	
     */		
	setSize : function(width,height)
	{
		if(width)this.width = width;
		if(height)this.height = height;		
	}
	// }}}		
	,		
	// {{{ setCssClassMessageBox(newCssClass)
    /**
     *	Assign the message box to a new css class.(in case you wants a different appearance on one of them)
     * 	
     *	@param String newCssClass = Name of new css class (Pass false if you want to change back to default)
     *
     * @public	
     */		
	setCssClassMessageBox : function(newCssClass)
	{
		this.cssClassOfMessageBox = newCssClass;
		if(this.divs_content_feedbk){
			if(this.cssClassOfMessageBox)
				this.divs_content_feedbk.className=this.cssClassOfMessageBox;
			else
				this.divs_content_feedbk.className='modalDialog_contentDiv_feedbk';	
		}
					
	}
	// }}}		
	,	
	// {{{ setShadowOffset(newShadowOffset)
    /**
     *	Specify the size of shadow
     * 	
     *	@param Int newShadowOffset = Offset of shadow div(in pixels from message box - x and y)
     *
     * @public	
     */		
	setShadowOffset : function(newShadowOffset)
	{
		this.shadowOffset = newShadowOffset
					
	}
	// }}}		
	,	
	// {{{ display()
    /**
     *	Display the modal dialog box
     * 	
     *
     * @public	
     */		
	display : function()
	{
		if(!this.divs_transparentDiv_feed){
			this.__createDivs();
		}	
		
		// Redisplaying divs
		this.divs_transparentDiv_feed.style.display='block';
		this.divs_content_feedbk.style.display='block';
		this.divs_shadow_feedbk.style.display='block';		
		if(this.MSIE)this.iframe.style.display='block';	
		this.__resizeDivs();
		
		/* Call the __resizeDivs method twice in case the css file has changed. The first execution of this method may not catch these changes */
		window.refToThisModalBoxObj = this;		
		setTimeout('window.refToThisModalBoxObj.__resizeDivs()',150);
		
		this.__insertContent();	// Calling method which inserts content into the message div.
	}
	// }}}		
	,
	// {{{ ()
    /**
     *	Display the modal dialog box
     * 	
     *
     * @public	
     */		
	setShadowDivVisible : function(visible)
	{
		this.shadowDivVisible = visible;
	}
	// }}}	
	,
	// {{{ close_feed()
    /**
     *	Close the modal dialog box
     * 	
     *
     * @public	
     */		
	close_feed : function()
	{
		//document.documentElement.style.overflow = '';	// Setting the CSS overflow attribute of the <html> tag back to default.
		
		/* Hiding divs */
		if(this.divs_transparentDiv_feed) {
			this.divs_transparentDiv_feed.style.display='none';
			this.divs_content_feedbk.style.display='none';
			this.divs_shadow_feedbk.style.display='none';
			if(this.MSIE)this.iframe.style.display='none';
		}
		
	}	
	// }}}	
	,
	// {{{ __addEvent()
    /**
     *	Add event
     * 	
     *
     * @private	
     */		
	addEvent : function(whichObject,eventType,functionName,suffix)
	{ 
	  if(!suffix)suffix = '';
	  if(whichObject.attachEvent){ 
	    whichObject['e'+eventType+functionName+suffix] = functionName; 
	    whichObject[eventType+functionName+suffix] = function(){whichObject['e'+eventType+functionName+suffix]( window.event );} 
	    whichObject.attachEvent( 'on'+eventType, whichObject[eventType+functionName+suffix] ); 
	  } else 
	    whichObject.addEventListener(eventType,functionName,false); 	    
	} 
	// }}}	
	,
	// {{{ __createDivs()
    /**
     *	Create the divs for the modal dialog box
     * 	
     *
     * @private	
     */		
	__createDivs : function()
	{
		// Creating transparent div
		this.divs_transparentDiv_feed = document.createElement('DIV');
		this.divs_transparentDiv_feed.className='modalDialog_transparentDivs_feedbk';
		this.divs_transparentDiv_feed.style.left = '0px';
		this.divs_transparentDiv_feed.style.top = '0px';
		this.divs_transparentDiv_feed.id = 'transpdiv_feedbk';
		document.body.appendChild(this.divs_transparentDiv_feed);
		// Creating content div
		this.divs_content_feedbk = document.createElement('DIV');
		this.divs_content_feedbk.className = 'modalDialog_contentDiv_feedbk';
		this.divs_content_feedbk.style.left = '0px';
		this.divs_content_feedbk.style.top = '0px';
		this.divs_content_feedbk.id = 'DHTMLSuite_modalBox_contentDiv_feedbk';
		this.divs_content_feedbk.style.zIndex = 1000;
		
		if(this.MSIE){
			this.iframe = document.createElement('<IFRAME src="about:blank" frameborder=0>');
			this.iframe.style.zIndex = 90000;
			this.iframe.id = 'iframe_id';
			this.iframe.style.position = 'fixed';
			document.body.appendChild(this.iframe);	
		}
			
		document.body.appendChild(this.divs_content_feedbk);
		// Creating shadow div
		this.divs_shadow_feedbk = document.createElement('DIV');
		this.divs_shadow_feedbk.className = 'modalDialog_contentDiv_shadow_feedbk';
		this.divs_shadow_feedbk.id = 'DHTMLmodalDialog_contentDiv_shadow_feedbk';
		this.divs_content_feedbk.style.position = 'absolute';
		this.divs_shadow_feedbk.style.zIndex = 95000;
		document.body.appendChild(this.divs_shadow_feedbk);
		window.refToModMessage = this;
		this.addEvent(window,'scroll',function(e){ window.refToModMessage.__repositionTransparentDiv() });
		this.addEvent(window,'resize',function(e){ window.refToModMessage.__repositionTransparentDiv() });
	}
	// }}}
	,
	// {{{ __getBrowserSize()
    /**
     *	Get browser size
     * 	
     *
     * @private	
     */		
	__getBrowserSize : function()
	{
    	var bodyWidth = document.documentElement.clientWidth;
    	var bodyHeight = document.documentElement.clientHeight;
    	
		var bodyWidth, bodyHeight; 
		if (self.innerHeight){ // all except Explorer 
		 
		   bodyWidth = self.innerWidth; 
		   bodyHeight = self.innerHeight; 
		}  else if (document.documentElement && document.documentElement.clientHeight) {
		   // Explorer 6 Strict Mode 		 
		   bodyWidth = document.documentElement.clientWidth; 
		   bodyHeight = document.documentElement.clientHeight; 
		} else if (document.body) {// other Explorers 		 
		   bodyWidth = document.body.clientWidth; 
		   bodyHeight = document.body.clientHeight; 
		} 
		return [bodyWidth,bodyHeight];		
		
	}
	// }}}	
	,
	// {{{ __resizeDivs()
    /**
     *	Resize the message divs
     * 	
     *
     * @private	
     */	
    __resizeDivs : function()
    {
    	
    	var topOffset = Math.max(document.body.scrollTop,document.documentElement.scrollTop);

		if(this.cssClassOfMessageBox)
			this.divs_content_feedbk.className=this.cssClassOfMessageBox;
		else
			this.divs_content_feedbk.className='modalDialog_contentDiv_feedbk';	
			    	
    	if(!this.divs_transparentDiv_feed)return;
    	
    	// Preserve scroll position
    	var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
    	var sl = Math.max(document.body.scrollLeft,document.documentElement.scrollLeft);
    	
    	window.scrollTo(sl,st);
    	setTimeout('window.scrollTo(' + sl + ',' + st + ');',10);

    	this.__repositionTransparentDiv();
    	

		var brSize = this.__getBrowserSize();
		var bodyWidth = brSize[0];
		var bodyHeight = brSize[1];
    	
    	// Setting width and height of content div
      	this.divs_content_feedbk.style.width = this.width + 'px';
    	this.divs_content_feedbk.style.height= this.height + 'px';  	
    	
    	// Creating temporary width variables since the actual width of the content div could be larger than this.width and this.height(i.e. padding and border)
    	var tmpWidth = this.divs_content_feedbk.offsetWidth;	
    	var tmpHeight = this.divs_content_feedbk.offsetHeight;
    	
    	
    	// Setting width and height of left transparent div
    	
    	this.divs_content_feedbk.style.left = Math.ceil((bodyWidth - tmpWidth) / 2) + 'px';;
    	//this.divs_content_feedbk.style.top = (Math.ceil((bodyHeight - tmpHeight) / 2) +  topOffset) + 'px';
    	this.divs_content_feedbk.style.top = '110px';
 		if(this.MSIE){
 				/*this.iframe.style.left = this.divs_content_feedbk.style.left;
 			this.iframe.style.top = this.divs_content_feedbk.style.top;
 			this.iframe.style.width = this.divs_content_feedbk.style.width;
 			this.iframe.style.height = this.divs_content_feedbk.style.height;*/
			this.iframe.style.width = '0px';
			this.iframe.style.height= '0px';
 		}
 		
    	this.divs_shadow_feedbk.style.left = (this.divs_content_feedbk.style.left.replace('px','')/1 + this.shadowOffset) + 'px';
    	this.divs_shadow_feedbk.style.top = (this.divs_content_feedbk.style.top.replace('px','')/1 + this.shadowOffset) + 'px';
    	this.divs_shadow_feedbk.style.height = tmpHeight + 'px';
    	this.divs_shadow_feedbk.style.width = tmpWidth + 'px';
    	
    	if(!this.shadowDivVisible)this.divs_shadow_feedbk.style.display='none';	// Hiding shadow if it has been disabled
    }
    // }}}	
    ,
	// {{{ __insertContent()
    /**
     *	Insert content into the content div
     * 	
     *
     * @private	
     */	    
    __repositionTransparentDiv : function()
    {
    	this.divs_transparentDiv_feed.style.top = Math.max(document.body.scrollTop,document.documentElement.scrollTop) + 'px';
    	this.divs_transparentDiv_feed.style.left = Math.max(document.body.scrollLeft,document.documentElement.scrollLeft) + 'px';
		var brSize = this.__getBrowserSize();
		var bodyWidth = brSize[0];
		var bodyHeight = brSize[1];
    	this.divs_transparentDiv_feed.style.width = bodyWidth + 'px';
    	this.divs_transparentDiv_feed.style.height = bodyHeight + 'px';		   	
    }
	// }}}	
	,
	// {{{ __insertContent()
    /**
     *	Insert content into the content div
     * 	
     *
     * @private	
     */	
    __insertContent : function()
    {
		if(this.url){	// url specified - load content dynamically
			ajax_loadContent('DHTMLSuite_modalBox_contentDiv_feedbk',this.url);
		}else{	// no url set, put static content inside the message box
			this.divs_content_feedbk.innerHTML = this.htmlOfModalMessage;	
		}
    }		
}

function displayMessage(url) {
	messageObj_feedbk.setSource(url);
	messageObj_feedbk.setCssClassMessageBox(false);
	messageObj_feedbk.setSize(400,200);
	messageObj_feedbk.setShadowDivVisible(true);	// Enable shadow for these boxes
	messageObj_feedbk.display();
}

function displayStaticMessage_feedbk(messageContent,cssClass) {
	messageObj_feedbk.setHtmlContent(messageContent);
	messageObj_feedbk.setSize(450,431);
	messageObj_feedbk.setCssClassMessageBox(cssClass);
	messageObj_feedbk.setSource(false);	// no html source since we want to use a static message here.
	messageObj_feedbk.setShadowDivVisible(false);	// Disable shadow for these boxes	
	messageObj_feedbk.display();
}

function closeMessage_feedbk() {
	messageObj_feedbk.close_feed();	
}
function feed(val){
		if(val=="1"){
			document.getElementById('emailid').style.display="none";
			document.getElementById('spamid').style.display="none";
			document.getElementById('emailid1').style.display="block";
			document.getElementById('spamid1').style.display="block";
			document.getElementById('feed').value="Praise";
		}
		if(val=="2"){
			document.getElementById('emailid').style.display="none";
			document.getElementById('spamid').style.display="none";
			document.getElementById('emailid1').style.display="block";
			document.getElementById('spamid1').style.display="block";
			document.getElementById('feed').value="Suggestion";
		}
		if(val=="3"){
			document.getElementById('emailid').style.display="none";
			document.getElementById('spamid').style.display="none";
			document.getElementById('emailid1').style.display="block";
			document.getElementById('spamid1').style.display="block";
			document.getElementById('feed').value="Complaint";
		}
		if(val=="4"){
			document.getElementById('emailid').style.display="block";
			document.getElementById('spamid').style.display="block";
				document.getElementById('emailid1').style.display="none";
			document.getElementById('spamid1').style.display="none";
			document.getElementById('feed').value="Inquiry";
		}
	}


messageObj_feedbk = new DHTML_modalMessage_feedbk();	// We only create one object of this class
messageObj_feedbk.setShadowOffset(0);	// Large shadow

function isEmailAddr1(email)
{
  var result = false;
  var theStr = new String(email);
  var index = theStr.indexOf("@");
  if (index > 0)
  {
    var pindex = theStr.indexOf(".",index);
    if ((pindex > index+1) && (theStr.length > pindex+1))
	result = true;
  }
  return result;
}


function test(){
	var msgType	= document.getElementById('feed').value;
	if(document.getElementById('sufeed_title').value==''){
		document.getElementById('sufeed_title').focus();
		document.getElementById('sufeed_title').style.border='1px solid red';
		return false;
	}
	else{
		document.getElementById('sufeed_title').style.border='1px solid #999999';
	}
	var sufeed_title= document.getElementById('sufeed_title').value;
	if(document.getElementById('sufeed_textarea').value==''){
		document.getElementById('sufeed_textarea').focus();
		document.getElementById('sufeed_textarea').style.border='1px solid red';
		return false;
	}
	else{
		document.getElementById('sufeed_textarea').style.border='1px solid #999999';
	}
	var msg= document.getElementById('sufeed_textarea').value;
	if(msgType=='Inquiry'){
		if(document.getElementById('email').value==''){
			document.getElementById('email').focus();
			document.getElementById('email').style.border='1px solid red';
			return false;
		}
		else{
			document.getElementById('email').style.border='1px solid #999999';
		}
		if(!isEmailAddr1(document.getElementById("email").value))	{
			document.getElementById('email').focus();
			document.getElementById('email').style.border='1px solid red';

			return false;
		}
		else{
			document.getElementById('email').style.border='1px solid #999999';
		}
		
		var emailid= document.getElementById('email').value;
		if(document.getElementById('spam').value!='10'){
			document.getElementById('spam').focus();
			document.getElementById('spam').style.border='1px solid red';
			return false;
		}
		else{
			document.getElementById('spam').style.border='1px solid #999999';
		}
	}
	else{
		var emailid= "";
	}
	var width = 850;
	var height = 627;
	var left = parseInt((screen.availWidth/2) - (width/2));
	var top = parseInt((screen.availHeight/2) - (height/2));
	var windowFeatures = "width=" + width + ",height=" + height + ",maximize=no,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
	myWindow = window.open(gl_path+"feedback_handle_response.php?feedbackcode="+feedbackcode_survey+"&action=add&msgType="+msgType+"&title="+sufeed_title+"&msg="+msg+"&emailid="+emailid+"&global_from_url="+global_from_url_fb, "subWind", windowFeatures);
	document.getElementById('transpdiv_feedbk').style.display='none';
	document.getElementById('DHTMLSuite_modalBox_contentDiv_feedbk').style.display='none';
	//document.getElementById('modalDialog_contentDiv_shadow_feedbk').style.display='none';
	//document.getElementById('modalDialog_contentDiv_feedbk').style.display='none';
}

//check_valid_url_su();
