/*

Copyright: DH Interactive Ltd @ 2010

*/

//***************************************************************************//
// Dropdown URL Automatic Load
function dropdown_auto(targ,selObj,url){
eval(targ+".location='"+url+selObj.options[selObj.selectedIndex].value+"'");
}
//***************************************************************************//

//***************************************************************************//
// Confirm Alert
function confirm_alert(msg, url){

// Remove Message
var msg = "Please Confirm!\n"+msg;

if(confirm(msg)){
top.location				=	url;
}

}
//***************************************************************************//

//***************************************************************************//
// Automatic Form Completion Disabled (Google)
if(window.attachEvent)
window.attachEvent("onload",setListeners);
function setListeners(){
inputList = document.getElementsByTagName("INPUT");
for(i=0;i<inputList.length;i++){
inputList[i].attachEvent("onpropertychange",restoreStyles);
inputList[i].style.backgroundColor = "";
}
selectList = document.getElementsByTagName("SELECT");
for(i=0;i<selectList.length;i++){
selectList[i].attachEvent("onpropertychange",restoreStyles);
selectList[i].style.backgroundColor = "";
}
}

function restoreStyles(){
if(event.srcElement.style.backgroundColor != "")
event.srcElement.style.backgroundColor = "";
}
//***************************************************************************//

//***************************************************************************//
function field_text_helper(type, formname, field, str){
if(type == "onRollOver"){
if (document[formname][field].value == str){
document[formname][field].value = "";
}
}
if(type == "onRollOut"){
if (document[formname][field].value == ""){
document[formname][field].value = str;
}
}
}
//***************************************************************************//

//***************************************************************************//
function helper_tip(type, field, str){
if(type == "onRollOver"){
document.getElementById(field).innerHTML = str;
}
if(type == "onRollOut"){
document.getElementById(field).innerHTML = str;
}
}
//***************************************************************************//
