var popWidth=700; var popHeight=300; function confirmDelete(href) { if(confirm("Are you sure you want to delete?")) { window.location=href; return true; } } function confirmed(href) { if(confirm("Are you sure?")) { window.location=href; return true; } } function closeWin() { window.close(); } function autoCloseWin(message) { alert (message); setTimeout("closeWin()",5000); } function reloadParentWin() { window.opener.location.reload(); } var win = null; function NewWindow(mypage,myname,w,h,scroll){ LeftPosition = (screen.width) ? (screen.width-w-20) : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable' win = window.open(mypage,myname,settings) } function openPopWin(url,winName, winHeight) { if(winHeight>0) popHeight=winHeight; NewWindow(url,winName, popWidth , popHeight , 'yes'); } function openEditor(code,siteCode) { var url; url ="EDITOR_URL?code=" + code + "&siteCode="+ siteCode; openPopWin(url,'Editor', popHeight); } function unSubscribe(href) { if(confirm("Are you sure you want to unsubscribe?")) { window.location=href; return true; } } function openHelpWin(url) { NewWindow(url,'Help', 400 , 200 , 'yes'); window.active="Help"; } function setMouseOverCssMenuClass(obj, cssClass) { if(cssClass=="headMenuHover") return; obj.style.backgroundColor = "#FCB06E"; } function setMouseOutCssMenuClass(obj, cssClass) { if(cssClass=="headMenuHover") return; obj.style.backgroundColor = "#9C9E9C"; } function search(e,obj,url) { var valSearch; var keychar; var d = document.getElementById(obj.id); //alert(d.value); valSearch=d.value; if (e.keyCode == 13) { window.location=url + "?search=" + valSearch; //document.frmSearch.submit(); } else { } } function clearSearch(obj) { //documet.name.value=""; obj.value=''; } function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(37.4419, -122.1419), 13); } } function showAuthorDetails(divID) { var divID = "div" + divID; document.getElementById(divID).style.display = 'block'; document.getElementById(divID).style.visibility = 'visible'; } function hideAuthorDetails(divID) { var divID = "div" + divID; document.getElementById(divID).style.display = 'none'; document.getElementById(divID).style.visibility = 'hidden'; } var displayID; /* to manage auto guide within input fields*/ function clearFieldValue_old(ID,fieldValue) { var m = document.getElementById(ID).value; if(m==fieldValue) { document.getElementById(ID).value=""; document.getElementById(ID).className.replace('lightText',''); } } function getFieldValue_old(ID,fieldValue) { var className = document.getElementById(ID).className; if(document.getElementById(ID).value=="") { className = className + " lightText"; document.getElementById(ID).value=fieldValue; document.getElementById(ID).className = className; } } /////////// function clearFieldValue(ID,fieldValue) { var m = document.getElementById(ID).value; if(m==fieldValue) { document.getElementById(ID).value=""; var className=document.getElementById(ID).className; document.getElementById(ID).className = className.replace(' lightText',''); //alert(document.getElementById(ID).className); } } function getFieldValue(ID,fieldValue) { var className = document.getElementById(ID).className; if(document.getElementById(ID).value=="") { if(!className.match('lightText')) { className = className + " lightText"; } document.getElementById(ID).value=fieldValue; document.getElementById(ID).className = className; } } /* to show hide sub content within CMS lists */ function divShow(divList,id,rootID) { var showImage = "https://www.iqaimmigration.com/theme/admin/en/adminimages/icon_show.png"; var hideImage = "https://www.iqaimmigration.com/theme/admin/en/adminimages/icon_hide.png"; if(!displayID && rootID) { displayID=rootID; } if(!displayID && !rootID) { displayID=id; } var divid=divList+id; var divDisplayID = divList+displayID; //alert(divid); //alert(divDisplayID); if(document.getElementById(id).src==showImage) { document.getElementById(divDisplayID).style.display="none"; document.getElementById(displayID).src=showImage; document.getElementById(divid).style.display='block'; document.getElementById(id).src=hideImage; displayID = id; } else { document.getElementById(divid).style.display='none'; document.getElementById(id).src=showImage; } } /* hides a container with given id value*/ function hideDiv(id) { document.getElementById(id).style.display="none"; } function showDiv(id) { document.getElementById(id).style.display="block"; } /*---- function to display tabcontent--------*/ function showHideTab(tab) { tab = parseInt(tab); var tabLeft = "tabLeft"+tab; var tabRight = "tabRight"+tab; var tabMain = "tabMain"+tab; var tabSeparator = "separator"+tab; var tabSeparatorNext = "separator"+ (tab+1); var tabSeparatorPrev = "separator" + (displayTabID+1); if(tab != displayTabID) { document.getElementById(displayTabID).style.display="none"; document.getElementById(displayTabLeft).className='tabLeft'; document.getElementById(displayTabRight).className ='tabRight'; document.getElementById(displayTabMain).className ='tabMain'; if(displayTabID>1){document.getElementById(displaySeparator).style.display="block";} if(displayTabID1){document.getElementById(tabSeparator).style.display="none";} if(tab