function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {

  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;

  var int_windowTop = (screen.height - a_int_windowHeight) / 2;

  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';

  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)

    if (parseInt(navigator.appVersion) >= 4) {

      obj_window.window.focus();

    }

  return obj_window;

}



function help(fieldname,body) {

	pagename = '?q=help,'+fieldname+','+body+'';

	newWindow (pagename, 'help', 500, 100, 1, 0, 0, 0, 0, 0, 0);

}



function rhino_bookmark(){

  url = document.location;

  title = document.title;

  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {

  window.external.AddFavorite(url,title);

  } else if (navigator.appName == "Netscape") {

    window.sidebar.addPanel(title,url,"");

  } else {

    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");

  }

}



function rhino_print () {

	var _url = document.location + "";

	var pos = _url.indexOf("?");

	if (pos >= 0) {

			url = document.location + '&print=1';		

	}

	else {

			url = document.location + '?print=1';

	}

	newWindow(url, 'Print', '800', '600', 1, 1, 1, 1, 1, 1, 0);

}



function rhino_tell () {

	var tellurl = 'modules/friend/';

	newWindow(tellurl, 'Print', '400', '300', 0, 0, 0, 0, 0, 0, 0);

}



function EnableDisable(id) {

     body=document.getElementById(id);

     if (body) {

       if (body.style.display == 'none') {

         try {

           body.style.display='table-row';

         } catch(e) {

           body.style.display = 'block';

         }

       }

       else {

         body.style.display = 'none';

       }

     }

}



function SetText (id, text) {

	body=document.getElementById(id);

	if (body) {

		body.innerHTML  = text;

	}

}







function Disable(id) {

	body=document.getElementById(id);

     if (body) {

     	body.style.display = 'none';

     }

}



function Enable(id) {

     body=document.getElementById(id);

     if (body) {

         try {

           body.style.display='table-row';

         } catch(e) {

           body.style.display = 'block';

         }

     }

}



function productPopUP(URL){

	document.getElementById('productPopUp').href = URL;

	$('a.example7').click();	

}

function ToggleProductInfo(value){
	if(value == "Product Complaint"){
		Enable('productInfo');
		Disable('uploadJob');
	}
	else
		if(value == "Job Application"){
		Disable('productInfo');
		Enable('uploadJob');
	}else{
		Disable('productInfo');
		Disable('uploadJob');
	}
}

/* hidding the submit buttons */
function ShowContinue (processing_id, continue_id) {
	//cnt = window.top.document.getElementById(continue_id);
	//cnt.innerHTML = '<input type="image" src="upload/setup_files/continue.jpg" alt="" align="right"/>';
	LEnable(continue_id);
	LDisable(processing_id);
	
}
function LDisable(id) {
	body=window.top.document.getElementById(id);
     if (body) {
     	body.style.display = 'none';
     }
}

function LEnable(id) {
     body=window.top.document.getElementById(id);
     if (body) {
         try {
           body.style.display='table-row';
         } catch(e) {
           body.style.display = 'block';
         }
     }
}
function HideContinue (processing_id, continue_id) {
	cnt = document.getElementById(processing_id);
	cnt.innerHTML = '<img onclick="ShowMessage();" src="upload/setup_files/loader.gif" alt="" align="center"/>';
	Enable(processing_id);
	Disable(continue_id);
}
function ShowMessage () {
	alert ('Please wait.  We are busy processing your request.');
}
/* hidding the submit buttons */
